From a150762c6359352a6469ae916a07d32e069a8e91 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 15 Nov 2020 14:46:55 -0500 Subject: [PATCH] Fix manga info description scrim on Android 5 --- .../tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 3cb7357a77..f6e0ba45a2 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 @@ -1,5 +1,7 @@ package eu.kanade.tachiyomi.ui.manga.info +import android.graphics.PorterDuff +import android.os.Build import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -19,6 +21,7 @@ import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.util.system.copyToClipboard +import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.view.setChips import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -307,6 +310,14 @@ class MangaInfoHeaderAdapter( initialLoad = false } } + + // 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 + ) + } } private fun showMangaInfo(visible: Boolean) {