From fee8ccab863e56781017d83801fc937b72976dca Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 27 Oct 2019 23:20:17 -0700 Subject: [PATCH] Theme fixes And one more inset fix for catalogue --- .../eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt | 2 ++ .../ui/catalogue/browse/BrowseCatalogueController.kt | 4 +--- app/src/main/res/drawable-v21/list_item_selector_dark.xml | 2 +- app/src/main/res/drawable/list_item_selector_dark.xml | 2 +- app/src/main/res/layout/catalogue_main_controller.xml | 1 + app/src/main/res/values-night/colors.xml | 1 + app/src/main/res/values-night/themes.xml | 2 +- app/src/main/res/values/colors.xml | 5 +++-- app/src/main/res/values/themes.xml | 2 +- 9 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt index ceed07a35d..dd8c3b1cec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt @@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.ui.catalogue.browse.BrowseCatalogueController import eu.kanade.tachiyomi.ui.catalogue.global_search.CatalogueSearchController import eu.kanade.tachiyomi.ui.catalogue.latest.LatestUpdatesController import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController +import eu.kanade.tachiyomi.util.RecyclerWindowInsetsListener import eu.kanade.tachiyomi.widget.preference.SourceLoginDialog import kotlinx.android.synthetic.main.catalogue_main_controller.* import uy.kohesive.injekt.Injekt @@ -101,6 +102,7 @@ class CatalogueController : NucleusController(), recycler.layoutManager = LinearLayoutManager(view.context) recycler.adapter = adapter recycler.addItemDecoration(SourceDividerItemDecoration(view.context)) + recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener) requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt index 26ae3ea108..53d36cb70a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt @@ -218,9 +218,7 @@ open class BrowseCatalogueController(bundle: Bundle) : recycler.adapter = adapter catalogue_view.addView(recycler, 1) - recycler.doOnApplyWindowInsets { v, insets, padding -> - v.updatePaddingRelative(bottom = padding.bottom + insets.systemWindowInsetBottom) - } + recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener) if (oldPosition != RecyclerView.NO_POSITION) { recycler.layoutManager?.scrollToPosition(oldPosition) } diff --git a/app/src/main/res/drawable-v21/list_item_selector_dark.xml b/app/src/main/res/drawable-v21/list_item_selector_dark.xml index 07b9ef6d5b..c86632f6a9 100644 --- a/app/src/main/res/drawable-v21/list_item_selector_dark.xml +++ b/app/src/main/res/drawable-v21/list_item_selector_dark.xml @@ -12,7 +12,7 @@ - + diff --git a/app/src/main/res/drawable/list_item_selector_dark.xml b/app/src/main/res/drawable/list_item_selector_dark.xml index 60034f8183..c3a6245050 100644 --- a/app/src/main/res/drawable/list_item_selector_dark.xml +++ b/app/src/main/res/drawable/list_item_selector_dark.xml @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/catalogue_main_controller.xml b/app/src/main/res/layout/catalogue_main_controller.xml index 84efdf4714..df9085a1d7 100644 --- a/app/src/main/res/layout/catalogue_main_controller.xml +++ b/app/src/main/res/layout/catalogue_main_controller.xml @@ -9,6 +9,7 @@ android:id="@+id/recycler" android:layout_width="match_parent" android:layout_height="wrap_content" + android:clipToPadding="false" tools:listitem="@layout/catalogue_main_controller_card" /> \ No newline at end of file diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index ae400a70c1..e08f4af761 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -3,4 +3,5 @@ @color/md_white_1000_12 @color/colorAccentDark #B3000000 + @color/colorDarkPrimary \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 7058ebd081..26d7308b7d 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -29,7 +29,7 @@ @drawable/list_item_selector_dark @drawable/library_item_selector_dark @color/textColorPrimaryDark - @color/dialogDark + @color/cardBackground @color/iconColorDark diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 617870a145..c1f38c8fb6 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -5,6 +5,7 @@ #54759E @color/md_black_1000_12 @color/colorPrimary + #FFFFFF #212121 #212121 @@ -39,8 +40,8 @@ @color/md_black_1000 @color/md_grey_900 - @color/colorDarkPrimaryDark - @color/colorDarkPrimary + #1C1C1D + @color/md_grey_800 @color/colorDarkPrimaryDark @color/md_blue_A200_50 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index d08a8b1de2..ea957bbbc1 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -36,7 +36,7 @@ @drawable/list_item_selector_light @drawable/library_item_selector_light @color/textColorPrimaryLight - @color/dialogLight + @color/cardBackground @color/iconColorLight @android:color/transparent