diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java index d701cfa6..f7139075 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java @@ -319,13 +319,13 @@ public class ThemePreviewActivity extends AppCompatActivity { collapsedTabTextColor = customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor; collapsedTabIndicatorColor = customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator; collapsedTabBackgroundColor = customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground; - linearLayout.setBackgroundColor(customTheme.backgroundColor); + linearLayout.setBackgroundColor(customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground); subredditNameTextView.setTextColor(customTheme.subreddit); usernameTextView.setTextColor(customTheme.username); subscribeSubredditChip.setTextColor(customTheme.chipTextColor); primaryTextView.setTextColor(customTheme.primaryTextColor); secondaryTextView.setTextColor(customTheme.secondaryTextColor); - bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(customTheme.backgroundColor)); + bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(customTheme.bottomAppBarBackgroundColor)); int primaryIconColor = customTheme.primaryIconColor; subscriptionsBottomAppBar.setColorFilter(primaryIconColor, android.graphics.PorterDuff.Mode.SRC_IN); multiRedditBottomAppBar.setColorFilter(primaryIconColor, android.graphics.PorterDuff.Mode.SRC_IN); @@ -358,10 +358,8 @@ public class ThemePreviewActivity extends AppCompatActivity { TypedValue tv = new TypedValue(); if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) { - int dp16 = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, getResources().getDisplayMetrics()); - linearLayout.setPadding(dp16, - TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics()) + statusBarHeight, - dp16, 0); + ((ViewGroup.MarginLayoutParams)linearLayout.getLayoutParams()).setMargins(0, + TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics()) + statusBarHeight, 0, 0); } } } 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 34f38542..d3e3b0e3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java @@ -401,8 +401,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp @Override protected void applyCustomTheme() { - int backgroundColor = mCustomThemeWrapper.getBackgroundColor(); - coordinatorLayout.setBackgroundColor(backgroundColor); + coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor()); collapsingToolbarLayout.setContentScrimColor(mCustomThemeWrapper.getColorPrimary()); applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar); expandedTabTextColor = mCustomThemeWrapper.getTabLayoutWithExpandedCollapsingToolbarTextColor(); @@ -411,14 +410,14 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp collapsedTabTextColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTextColor(); collapsedTabIndicatorColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTabIndicator(); collapsedTabBackgroundColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTabBackground(); - linearLayout.setBackgroundColor(backgroundColor); + linearLayout.setBackgroundColor(expandedTabBackgroundColor); subredditNameTextView.setTextColor(mCustomThemeWrapper.getSubreddit()); subscribeSubredditChip.setTextColor(mCustomThemeWrapper.getChipTextColor()); int primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor(); nSubscribersTextView.setTextColor(primaryTextColor); nOnlineSubscribersTextView.setTextColor(primaryTextColor); descriptionTextView.setTextColor(primaryTextColor); - bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(backgroundColor)); + bottomNavigationView.setBackgroundTint(ColorStateList.valueOf(mCustomThemeWrapper.getBottomAppBarBackgroundColor())); int primaryIconColor = mCustomThemeWrapper.getPrimaryIconColor(); subscriptionsBottomAppBar.setColorFilter(primaryIconColor, android.graphics.PorterDuff.Mode.SRC_IN); multiRedditBottomAppBar.setColorFilter(primaryIconColor, android.graphics.PorterDuff.Mode.SRC_IN); 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 c6bfec6a..8af8944c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java @@ -14,6 +14,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; +import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; @@ -99,6 +100,8 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele AppBarLayout appBarLayout; @BindView(R.id.toolbar_view_user_detail_activity) Toolbar toolbar; + @BindView(R.id.toolbar_linear_layout_view_user_detail_activity) + LinearLayout linearLayout; @BindView(R.id.tab_layout_view_user_detail_activity) TabLayout tabLayout; @BindView(R.id.collapsing_toolbar_layout_view_user_detail_activity) @@ -424,6 +427,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele collapsedTabTextColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTextColor(); collapsedTabIndicatorColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTabIndicator(); collapsedTabBackgroundColor = mCustomThemeWrapper.getTabLayoutWithCollapsedCollapsingToolbarTabBackground(); + linearLayout.setBackgroundColor(expandedTabBackgroundColor); unsubscribedColor = mCustomThemeWrapper.getUnsubscribed(); subscribedColor = mCustomThemeWrapper.getSubscribed(); userNameTextView.setTextColor(mCustomThemeWrapper.getUsername()); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java index 91cae44a..17f9ff2f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MessageRecyclerViewAdapter.java @@ -252,6 +252,7 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index d5ef9e43..8b2e3546 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -51,6 +51,7 @@ android:elevation="4dp" /> White White Dark White Amoled + Red + Red Dark + Red Amoled Create a Light Theme\nBase on Indigo Theme Create a Dark Theme\nBase on Indigo Dark Theme Create an Amoled Theme\nBase on Indigo Amoled Theme