diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-03-27 11:22:26 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-03-27 11:22:26 +0000 |
commit | 7e222091c8ae8619c8f3bed297bb248f07177261 (patch) | |
tree | 76462ec55b3eecc33bb94a5096c729ea8c20395b /app | |
parent | 1cfdaf41fa7d4ce4cf7065d13667bef32c27066a (diff) | |
download | infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar.gz infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar.bz2 infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar.lz infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar.xz infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.tar.zst infinity-for-reddit-7e222091c8ae8619c8f3bed297bb248f07177261.zip |
Fix some issues of custom theme.
Diffstat (limited to 'app')
4 files changed, 5 insertions, 9 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountSavedThingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountSavedThingActivity.java index d95a1735..11062a31 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountSavedThingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountSavedThingActivity.java @@ -107,13 +107,6 @@ public class AccountSavedThingActivity extends BaseActivity { } } - int statusBarResourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); - if (statusBarResourceId > 0) { - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) toolbar.getLayoutParams(); - params.topMargin = getResources().getDimensionPixelSize(statusBarResourceId); - toolbar.setLayoutParams(params); - } - setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java index 99027e23..925efd0e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java @@ -1,6 +1,7 @@ package ml.docilealligator.infinityforreddit.Activity; import android.content.SharedPreferences; +import android.content.res.ColorStateList; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; @@ -105,6 +106,7 @@ public class RulesActivity extends BaseActivity { } } + appBarLayout.setBackgroundColor(mCustomThemeWrapper.getColorPrimary()); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -131,6 +133,7 @@ public class RulesActivity extends BaseActivity { protected void applyCustomTheme() { coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor()); applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar); + progressBar.setIndeterminateTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorAccent())); errorTextView.setTextColor(mCustomThemeWrapper.getSecondaryTextColor()); } diff --git a/app/src/main/res/layout/activity_account_saved_thing.xml b/app/src/main/res/layout/activity_account_saved_thing.xml index 351c716f..4fb26ebe 100644 --- a/app/src/main/res/layout/activity_account_saved_thing.xml +++ b/app/src/main/res/layout/activity_account_saved_thing.xml @@ -29,7 +29,8 @@ android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:layout_scrollFlags="scroll|enterAlways" - app:popupTheme="@style/AppTheme.PopupOverlay" /> + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> </com.google.android.material.appbar.CollapsingToolbarLayout> diff --git a/app/src/main/res/layout/activity_rules.xml b/app/src/main/res/layout/activity_rules.xml index 91f35cf2..4012d419 100644 --- a/app/src/main/res/layout/activity_rules.xml +++ b/app/src/main/res/layout/activity_rules.xml @@ -26,7 +26,6 @@ android:id="@+id/toolbar_rules_activity" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" app:navigationIcon="?attr/homeAsUpIndicator" /> |