Theme fixes

And one more inset fix for catalogue
This commit is contained in:
Jay 2019-10-27 23:20:17 -07:00
parent 1d7d40ba8c
commit fee8ccab86
9 changed files with 12 additions and 9 deletions

View File

@ -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.global_search.CatalogueSearchController
import eu.kanade.tachiyomi.ui.catalogue.latest.LatestUpdatesController import eu.kanade.tachiyomi.ui.catalogue.latest.LatestUpdatesController
import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController
import eu.kanade.tachiyomi.util.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.widget.preference.SourceLoginDialog import eu.kanade.tachiyomi.widget.preference.SourceLoginDialog
import kotlinx.android.synthetic.main.catalogue_main_controller.* import kotlinx.android.synthetic.main.catalogue_main_controller.*
import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.Injekt
@ -101,6 +102,7 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
recycler.layoutManager = LinearLayoutManager(view.context) recycler.layoutManager = LinearLayoutManager(view.context)
recycler.adapter = adapter recycler.adapter = adapter
recycler.addItemDecoration(SourceDividerItemDecoration(view.context)) recycler.addItemDecoration(SourceDividerItemDecoration(view.context))
recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301) requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301)
} }

View File

@ -218,9 +218,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
recycler.adapter = adapter recycler.adapter = adapter
catalogue_view.addView(recycler, 1) catalogue_view.addView(recycler, 1)
recycler.doOnApplyWindowInsets { v, insets, padding -> recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
v.updatePaddingRelative(bottom = padding.bottom + insets.systemWindowInsetBottom)
}
if (oldPosition != RecyclerView.NO_POSITION) { if (oldPosition != RecyclerView.NO_POSITION) {
recycler.layoutManager?.scrollToPosition(oldPosition) recycler.layoutManager?.scrollToPosition(oldPosition)
} }

View File

@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<color android:color="@color/dialogDark"/> <color android:color="@color/colorDarkPrimary"/>
</item> </item>
</selector> </selector>
</item> </item>

View File

@ -5,6 +5,6 @@
<item android:drawable="@color/rippleColorDark" android:state_focused="true"/> <item android:drawable="@color/rippleColorDark" android:state_focused="true"/>
<item android:drawable="@color/rippleColorDark" android:state_pressed="true"/> <item android:drawable="@color/rippleColorDark" android:state_pressed="true"/>
<item android:drawable="@color/rippleColorDark" android:state_activated="true"/> <item android:drawable="@color/rippleColorDark" android:state_activated="true"/>
<item android:drawable="@color/dialogDark"/> <item android:drawable="@color/colorDarkPrimary"/>
</selector> </selector>

View File

@ -9,6 +9,7 @@
android:id="@+id/recycler" android:id="@+id/recycler"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/catalogue_main_controller_card" /> tools:listitem="@layout/catalogue_main_controller_card" />
</FrameLayout> </FrameLayout>

View File

@ -3,4 +3,5 @@
<color name="drawerHighlight">@color/md_white_1000_12</color> <color name="drawerHighlight">@color/md_white_1000_12</color>
<color name="drawerPrimary">@color/colorAccentDark</color> <color name="drawerPrimary">@color/colorAccentDark</color>
<color name="oldNavBarBackground">#B3000000</color> <color name="oldNavBarBackground">#B3000000</color>
<color name="cardBackground">@color/colorDarkPrimary</color>
</resources> </resources>

View File

@ -29,7 +29,7 @@
<item name="selectable_list_drawable">@drawable/list_item_selector_dark</item> <item name="selectable_list_drawable">@drawable/list_item_selector_dark</item>
<item name="selectable_library_drawable">@drawable/library_item_selector_dark</item> <item name="selectable_library_drawable">@drawable/library_item_selector_dark</item>
<item name="text_color_primary">@color/textColorPrimaryDark</item> <item name="text_color_primary">@color/textColorPrimaryDark</item>
<item name="background_card">@color/dialogDark</item> <item name="background_card">@color/cardBackground</item>
<item name="icon_color">@color/iconColorDark</item> <item name="icon_color">@color/iconColorDark</item>
</style> </style>

View File

@ -5,6 +5,7 @@
<color name="colorPrimaryDark">#54759E</color> <color name="colorPrimaryDark">#54759E</color>
<color name="drawerHighlight">@color/md_black_1000_12</color> <color name="drawerHighlight">@color/md_black_1000_12</color>
<color name="drawerPrimary">@color/colorPrimary</color> <color name="drawerPrimary">@color/colorPrimary</color>
<color name="cardBackground">#FFFFFF</color>
<!-- Dark Application Colors --> <!-- Dark Application Colors -->
<color name="colorDarkPrimary">#212121</color> <color name="colorDarkPrimary">#212121</color>
<color name="colorDarkPrimaryDark">#212121</color> <color name="colorDarkPrimaryDark">#212121</color>
@ -39,8 +40,8 @@
<color name="statusBarDark">@color/md_black_1000</color> <color name="statusBarDark">@color/md_black_1000</color>
<color name="appBarDark">@color/md_grey_900</color> <color name="appBarDark">@color/md_grey_900</color>
<color name="backgroundDark">@color/colorDarkPrimaryDark</color> <color name="backgroundDark">#1C1C1D</color>
<color name="dialogDark">@color/colorDarkPrimary</color> <color name="dialogDark">@color/md_grey_800</color>
<color name="dialog_amoled">@color/colorDarkPrimaryDark</color> <color name="dialog_amoled">@color/colorDarkPrimaryDark</color>
<color name="selectorColorDark">@color/md_blue_A200_50</color> <color name="selectorColorDark">@color/md_blue_A200_50</color>

View File

@ -36,7 +36,7 @@
<item name="selectable_list_drawable">@drawable/list_item_selector_light</item> <item name="selectable_list_drawable">@drawable/list_item_selector_light</item>
<item name="selectable_library_drawable">@drawable/library_item_selector_light</item> <item name="selectable_library_drawable">@drawable/library_item_selector_light</item>
<item name="text_color_primary">@color/textColorPrimaryLight</item> <item name="text_color_primary">@color/textColorPrimaryLight</item>
<item name="background_card">@color/dialogLight</item> <item name="background_card">@color/cardBackground</item>
<item name="icon_color">@color/iconColorLight</item> <item name="icon_color">@color/iconColorLight</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">@android:color/transparent</item>