From 430ff80198b4441fab9c693ddbe906f74b1d7069 Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 19 Nov 2021 17:39:30 -0500 Subject: [PATCH] Add tertiary badge in appearance preview (closes #5867) --- .../preference/ThemesPreferenceAdapter.kt | 3 +++ app/src/main/res/layout/pref_theme_item.xml | 25 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt index 20a4fdc0d..34f669cc9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt @@ -54,6 +54,9 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) : fun bind(appTheme: PreferenceValues.AppTheme) { binding.name.text = view.context.getString(appTheme.titleResId!!) + // For rounded corners + binding.badges.clipToOutline = true + val isSelected = preferences.appTheme().get() == appTheme binding.themeCard.isChecked = isSelected binding.themeCard.strokeColor = if (isSelected) selectedColor else unselectedColor diff --git a/app/src/main/res/layout/pref_theme_item.xml b/app/src/main/res/layout/pref_theme_item.xml index d7ba95a71..f66384e23 100644 --- a/app/src/main/res/layout/pref_theme_item.xml +++ b/app/src/main/res/layout/pref_theme_item.xml @@ -59,16 +59,27 @@ app:layout_constraintStart_toStartOf="parent" app:tint="?android:attr/divider" /> - + app:layout_constraintTop_toTopOf="@+id/cover_container"> + + + + + +