From cef1c4b8a15246959e4e8a6708bec3c5d9bcaea8 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 27 Dec 2020 17:58:03 -0500 Subject: [PATCH] Tweak manga info header backdrop --- .../ui/manga/info/MangaInfoHeaderAdapter.kt | 12 ++++++--- .../main/res/drawable/manga_info_gradient.xml | 2 +- app/src/main/res/layout/manga_info_header.xml | 26 ++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt index 4a5108d007..77c3f4df09 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt @@ -311,10 +311,14 @@ class MangaInfoHeaderAdapter( // backgroundTint attribute doesn't work properly on Android 5 if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) { - binding.mangaInfoToggleMoreScrim.background.setColorFilter( - view.context.getResourceColor(android.R.attr.colorBackground), - PorterDuff.Mode.SRC_ATOP - ) + listOf(binding.backdropOverlay, binding.mangaInfoToggleMoreScrim) + .forEach { + @Suppress("DEPRECATION") + it.background.setColorFilter( + view.context.getResourceColor(android.R.attr.colorBackground), + PorterDuff.Mode.SRC_ATOP + ) + } } } diff --git a/app/src/main/res/drawable/manga_info_gradient.xml b/app/src/main/res/drawable/manga_info_gradient.xml index 003e925eac..d378ad2045 100644 --- a/app/src/main/res/drawable/manga_info_gradient.xml +++ b/app/src/main/res/drawable/manga_info_gradient.xml @@ -4,7 +4,7 @@ diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml index c5a9967973..240fb9d138 100644 --- a/app/src/main/res/layout/manga_info_header.xml +++ b/app/src/main/res/layout/manga_info_header.xml @@ -15,7 +15,7 @@ android:id="@+id/backdrop" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginBottom="?attr/actionBarSize" + android:layout_marginBottom="44dp" android:alpha="0.2" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -24,10 +24,12 @@ tools:background="@mipmap/ic_launcher" /> @@ -129,24 +131,17 @@ - - - - + app:layout_constraintTop_toBottomOf="@+id/manga_info" />