aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-27 06:40:48 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-27 06:40:48 +0000
commitf40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a (patch)
tree7dbfe295e7c3e4cea63d2bcbcb868b5aaf197d6a /app/src/main/java/ml/docilealligator
parent6ad725762ba11100b7373767d8c3c3feee88364c (diff)
downloadinfinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar.gz
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar.bz2
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar.lz
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar.xz
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.tar.zst
infinity-for-reddit-f40b9cbde003d9c3cc0eaa0d3c4eadb072f67c4a.zip
Fix some bugs related to custom themes.
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java8
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java3
3 files changed, 5 insertions, 10 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java
index eb918960..b8fb82a4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java
@@ -169,11 +169,11 @@ public class CustomThemeListingActivity extends BaseActivity implements CustomTh
}
if (isDarkTheme) {
CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(
- CustomThemeWrapper.getIndigo(CustomThemeListingActivity.this), darkThemeSharedPreferences);
+ CustomThemeWrapper.getIndigoDark(CustomThemeListingActivity.this), darkThemeSharedPreferences);
}
if (isAmoledTheme) {
CustomThemeSharedPreferencesUtils.insertThemeToSharedPreferences(
- CustomThemeWrapper.getIndigo(CustomThemeListingActivity.this), amoledThemeSharedPreferences);
+ CustomThemeWrapper.getIndigoAmoled(CustomThemeListingActivity.this), amoledThemeSharedPreferences);
}
EventBus.getDefault().post(new RecreateActivityEvent());
}).execute())
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
index 13aca8a1..db54a483 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
@@ -250,13 +250,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
params = (AppBarLayout.LayoutParams) collapsingToolbarLayout.getLayoutParams();
- //Get status bar height
- int statusBarHeight = 0;
- int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
- if (resourceId > 0) {
- statusBarHeight = getResources().getDimensionPixelSize(resourceId);
- }
-
String title = "r/" + subredditName;
subredditNameTextView.setText(title);
@@ -346,6 +339,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
protected void applyCustomTheme() {
int backgroundColor = mCustomThemeWrapper.getBackgroundColor();
coordinatorLayout.setBackgroundColor(backgroundColor);
+ collapsingToolbarLayout.setContentScrimColor(mCustomThemeWrapper.getColorPrimary());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
linearLayout.setBackgroundColor(backgroundColor);
subredditNameTextView.setTextColor(mCustomThemeWrapper.getSubreddit());
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
index 8e90f20b..6242e801 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
@@ -410,6 +410,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
@Override
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
+ collapsingToolbarLayout.setContentScrimColor(mCustomThemeWrapper.getColorPrimary());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
expandedTabTextColor = mCustomThemeWrapper.getTabLayoutWithExpandedCollapsingToolbarTextColor();
expandedTabIndicatorColor = mCustomThemeWrapper.getTabLayoutWithExpandedCollapsingToolbarTabIndicator();
@@ -546,7 +547,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.view_user_detail_activity, menu);
- applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
+ applyMenuItemTheme(menu);
mMenu = menu;
MenuItem lazyModeItem = mMenu.findItem(R.id.action_lazy_mode_view_user_detail_activity);
if (isInLazyMode) {