From 275063684779a02efe7ec8ef971bb219b1f4fd33 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 14 Aug 2022 17:47:57 +1000 Subject: [PATCH] Apply custom theme to the header of the navigation drawer. --- .../HeaderSectionRecyclerViewAdapter.java | 11 ++++++++++- .../NavigationDrawerRecyclerViewMergedAdapter.java | 4 ++-- app/src/main/res/drawable/side_nav_bar.xml | 9 --------- app/src/main/res/layout/nav_header_main.xml | 6 ++---- 4 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 app/src/main/res/drawable/side_nav_bar.xml 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 { 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 - - \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index 2b30f55a..6619f129 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -2,7 +2,6 @@ @@ -11,7 +10,7 @@ android:id="@+id/banner_image_view_nav_header_main" android:layout_width="match_parent" android:layout_height="match_parent" - android:scaleType="centerCrop"/> + android:scaleType="centerCrop" /> + android:layout_marginEnd="16dp" />