From 7e222091c8ae8619c8f3bed297bb248f07177261 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 27 Mar 2020 19:22:26 +0800 Subject: Fix some issues of custom theme. --- .../infinityforreddit/Activity/AccountSavedThingActivity.java | 7 ------- .../docilealligator/infinityforreddit/Activity/RulesActivity.java | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'app/src/main/java/ml') 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()); } -- cgit v1.2.3