diff options
Diffstat (limited to 'app/src/main/java/ml')
2 files changed, 12 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/HeaderSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/HeaderSectionRecyclerViewAdapter.java index efc4ecc0..55989855 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/HeaderSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/HeaderSectionRecyclerViewAdapter.java @@ -29,11 +29,13 @@ import butterknife.ButterKnife; import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.activities.BaseActivity; +import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; import pl.droidsonroids.gif.GifImageView; public class HeaderSectionRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private BaseActivity baseActivity; + private CustomThemeWrapper customThemeWrapper; private Resources resources; private RequestManager glide; private String accountName; @@ -46,12 +48,14 @@ public class HeaderSectionRecyclerViewAdapter extends RecyclerView.Adapter<Recyc private boolean isInMainPage = true; private PageToggle pageToggle; - public HeaderSectionRecyclerViewAdapter(BaseActivity baseActivity, RequestManager glide, String accountName, + public HeaderSectionRecyclerViewAdapter(BaseActivity baseActivity, CustomThemeWrapper customThemeWrapper, + RequestManager glide, String accountName, SharedPreferences sharedPreferences, SharedPreferences navigationDrawerSharedPreferences, SharedPreferences securitySharedPreferences, PageToggle pageToggle) { this.baseActivity = baseActivity; + this.customThemeWrapper = customThemeWrapper; resources = baseActivity.getResources(); this.glide = glide; this.accountName = accountName; @@ -206,6 +210,11 @@ public class HeaderSectionRecyclerViewAdapter extends RecyclerView.Adapter<Recyc accountNameTextView.setTypeface(baseActivity.typeface); karmaTextView.setTypeface(baseActivity.typeface); } + + itemView.setBackgroundColor(customThemeWrapper.getColorPrimary()); + accountNameTextView.setTextColor(customThemeWrapper.getToolbarPrimaryTextAndIconColor()); + karmaTextView.setTextColor(customThemeWrapper.getToolbarSecondaryTextColor()); + dropIconImageView.setColorFilter(customThemeWrapper.getToolbarPrimaryTextAndIconColor(), android.graphics.PorterDuff.Mode.SRC_IN); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/NavigationDrawerRecyclerViewMergedAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/NavigationDrawerRecyclerViewMergedAdapter.java index f3159f93..923af7eb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/NavigationDrawerRecyclerViewMergedAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/NavigationDrawerRecyclerViewMergedAdapter.java @@ -34,8 +34,8 @@ public class NavigationDrawerRecyclerViewMergedAdapter { ItemClickListener itemClickListener) { RequestManager glide = Glide.with(baseActivity); - headerSectionRecyclerViewAdapter = new HeaderSectionRecyclerViewAdapter(baseActivity, glide, accountName, - sharedPreferences, navigationDrawerSharedPreferences, securitySharedPreferences, + headerSectionRecyclerViewAdapter = new HeaderSectionRecyclerViewAdapter(baseActivity, customThemeWrapper, + glide, accountName, sharedPreferences, navigationDrawerSharedPreferences, securitySharedPreferences, new HeaderSectionRecyclerViewAdapter.PageToggle() { @Override public void openAccountSection() { |