Skip to content

Commit eef8f7e

Browse files
Slight code cleanup, visual adjustments
1 parent 3da9c13 commit eef8f7e

File tree

7 files changed

+14
-29
lines changed

7 files changed

+14
-29
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:icon="@mipmap/ic_launcher"
1313
android:roundIcon="@mipmap/ic_launcher_round"
1414
android:label="@string/app_name"
15-
android:supportsRtl="false"
15+
android:supportsRtl="true"
1616
android:theme="@style/AppTheme">
1717
<activity
1818
android:name=".ui.activities.LoginActivity"

app/src/main/java/com/sakaimobile/development/sakaiclient20/ui/activities/CreditsActivity.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class CreditsActivity extends AppCompatActivity {
1616
private static final String[] creditsList = {
1717
"Rutgers Sakai",
1818
"Icons8",
19-
"Logomakr",
2019
"RxAndroid",
2120
"AndroidTreeView",
2221
"Retrofit",
@@ -26,14 +25,12 @@ public class CreditsActivity extends AppCompatActivity {
2625
private static final String[] creditsURLs = {
2726
"https://sakai.rutgers.edu/direct/describe",
2827
"https://icons8.com/",
29-
"https://logomakr.com/",
3028
"https://github.com/ReactiveX/RxAndroid",
3129
"https://github.com/bmelnychuk/AndroidTreeView",
3230
"https://github.com/square/retrofit",
3331
"https://github.com/square/okhttp"
3432
};
3533

36-
3734
@Override
3835
protected void onCreate(Bundle savedInstanceState) {
3936
super.onCreate(savedInstanceState);
@@ -44,21 +41,17 @@ protected void onCreate(Bundle savedInstanceState) {
4441
toolbar.setNavigationOnClickListener((v) -> onBackPressed());
4542

4643
ListView creditsListView = findViewById(R.id.credits_list_view);
47-
creditsListView.setOnItemClickListener(
48-
((parent, view, position, id) -> {
49-
String url = creditsURLs[position];
50-
openURL(url);
51-
})
52-
);
44+
creditsListView.setOnItemClickListener((parent, view, position, id) -> {
45+
String url = creditsURLs[position];
46+
openURL(url);
47+
});
5348

5449
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.credits_item, R.id.creditNameTxt, creditsList);
5550
creditsListView.setAdapter(adapter);
56-
5751
}
5852

5953

6054
private void openURL(String url) {
61-
6255
Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
6356
viewIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
6457
viewIntent.setPackage("com.android.chrome");

app/src/main/java/com/sakaimobile/development/sakaiclient20/ui/activities/LoadingActivity.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ import kotlinx.android.synthetic.main.activity_loading.*
1616
import javax.inject.Inject
1717
import android.view.animation.DecelerateInterpolator
1818
import android.animation.ObjectAnimator
19-
import android.graphics.BitmapFactory
20-
import android.support.v4.graphics.drawable.RoundedBitmapDrawable
21-
import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory
2219
import android.widget.Toast
2320

2421

@@ -47,7 +44,7 @@ class LoadingActivity : AppCompatActivity() {
4744
// Just in case network connectivity changes as refresh is occurring,
4845
// make sure the user is notified of this.
4946
loadingPageViewModel.errorState.observe(this, Observer {
50-
Toast.makeText(this, "We had trouble reaching Sakai!", Toast.LENGTH_SHORT).show()
47+
Toast.makeText(this, "We had trouble reaching Sakai, please restart this application", Toast.LENGTH_LONG).show()
5148
})
5249

5350
loadingPageViewModel.getRefreshProgress(true).observe(this, Observer { progress ->

app/src/main/res/drawable/rounded_progress_bar.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<scale android:scaleWidth="100%">
1111
<shape>
1212
<corners android:radius="4dp"/>
13-
<solid android:color="@color/sakaiTint"/>
13+
<!--This is a non-standard color to match the red in the app icon-->
14+
<solid android:color="#c62828"/>
1415
</shape>
1516
</scale>
1617
</item>

app/src/main/res/values/colors.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="colorPrimary">#d34646</color>
4-
<color name="colorPrimaryDark">#8F1717</color>
5-
<color name="colorAccent">#8F1717</color>
3+
<!--<color name="colorPrimary">#d34646</color>-->
4+
<!--<color name="colorPrimaryDark">#8F1717</color>-->
5+
<color name="colorPrimary">#333333</color>
6+
<color name="colorPrimaryDark">@color/sakaiTint</color>
7+
<color name="colorAccent">@color/sakaiTint</color>
68
<color name="white">#FFFFFF</color>
79

810
<!-- Course Header colors -->

app/src/main/res/values/styles.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,10 @@
6565

6666
<style name="PreferencesTheme" parent="@style/PreferenceThemeOverlay">
6767
<item name="android:textColor">@color/secondaryTextColor</item>
68+
<!-- Color for summaries (eg. version text) -->
6869
<item name="android:textColorSecondary">@color/secondaryTextColor</item>
6970
<!-- White color for category headings -->
7071
<item name="colorAccent">@color/primaryTextColor</item>
71-
<item name="colorPrimary">@color/primaryTextColor</item>
72-
<item name="colorPrimaryDark">@color/primaryTextColor</item>
73-
<item name="colorSecondary">@color/primaryTextColor</item>
7472
</style>
7573

7674
</resources>

app/src/main/res/xml/preferences.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
android:key="version"
88
android:title="About">
99
<intent android:action="android.intent.action.VIEW"
10-
android:targetPackage="com.android.chrome"
1110
android:data="https://rutgerssakai.github.io/SakaiMobile/"/>
1211
</Preference>
1312
<Preference
1413
android:icon="@drawable/ic_security"
1514
android:title="Privacy Policy">
1615
<intent android:action="android.intent.action.VIEW"
17-
android:targetPackage="com.android.chrome"
1816
android:data="https://rutgerssakai.github.io/SakaiMobile/privacy.html"/>
1917
</Preference>
2018
<Preference
@@ -39,7 +37,6 @@
3937
android:icon="@drawable/ic_star"
4038
android:title="Rate Rutgers Sakai Mobile">
4139
<intent android:action="android.intent.action.VIEW"
42-
android:targetPackage="com.android.chrome"
4340
android:data="https://play.google.com/store/apps/details?id=com.sakaimobile.development.sakaiclient20"/>
4441
</Preference>
4542
</PreferenceCategory>
@@ -48,19 +45,16 @@
4845
<Preference
4946
android:title="How does Sakai Mobile keep me logged in?">
5047
<intent android:action="android.intent.action.VIEW"
51-
android:targetPackage="com.android.chrome"
5248
android:data="https://rutgerssakai.github.io/SakaiMobile/faq.html#android-how-does-smart-lock-work"/>
5349
</Preference>
5450
<Preference
5551
android:title="I previously disabled auto-login and want to re-enable it">
5652
<intent android:action="android.intent.action.VIEW"
57-
android:targetPackage="com.android.chrome"
5853
android:data="https://rutgerssakai.github.io/SakaiMobile/faq.html#android-how-enable-smart-lock"/>
5954
</Preference>
6055
<Preference
6156
android:title="I want Sakai Mobile to forget my credentials">
6257
<intent android:action="android.intent.action.VIEW"
63-
android:targetPackage="com.android.chrome"
6458
android:data="https://rutgerssakai.github.io/SakaiMobile/faq.html#android-how-to-delete-credentials"/>
6559
</Preference>
6660
</PreferenceCategory>

0 commit comments

Comments
 (0)