Add tertiary badge in appearance preview (closes #5867)
This commit is contained in:
parent
230fa76d57
commit
430ff80198
@ -54,6 +54,9 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) :
|
|||||||
fun bind(appTheme: PreferenceValues.AppTheme) {
|
fun bind(appTheme: PreferenceValues.AppTheme) {
|
||||||
binding.name.text = view.context.getString(appTheme.titleResId!!)
|
binding.name.text = view.context.getString(appTheme.titleResId!!)
|
||||||
|
|
||||||
|
// For rounded corners
|
||||||
|
binding.badges.clipToOutline = true
|
||||||
|
|
||||||
val isSelected = preferences.appTheme().get() == appTheme
|
val isSelected = preferences.appTheme().get() == appTheme
|
||||||
binding.themeCard.isChecked = isSelected
|
binding.themeCard.isChecked = isSelected
|
||||||
binding.themeCard.strokeColor = if (isSelected) selectedColor else unselectedColor
|
binding.themeCard.strokeColor = if (isSelected) selectedColor else unselectedColor
|
||||||
|
@ -59,16 +59,27 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:tint="?android:attr/divider" />
|
app:tint="?android:attr/divider" />
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/cover_badge"
|
android:id="@+id/badges"
|
||||||
android:layout_width="12dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="16dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:src="@drawable/rounded_rectangle"
|
android:background="@drawable/rounded_rectangle"
|
||||||
app:tint="?attr/colorAccent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/cover_container"
|
app:layout_constraintStart_toStartOf="@+id/cover_container"
|
||||||
app:layout_constraintTop_toTopOf="@+id/cover_container" />
|
app:layout_constraintTop_toTopOf="@+id/cover_container">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:background="?attr/colorTertiary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:background="?attr/colorSecondary" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/bottom_nav"
|
android:id="@+id/bottom_nav"
|
||||||
|
Loading…
Reference in New Issue
Block a user