File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import android.view.LayoutInflater
66import android.view.View
77import android.view.ViewGroup
88import android.widget.ImageView
9+ import android.widget.LinearLayout
910import android.widget.TextView
1011import androidx.appcompat.app.AppCompatDelegate
1112import androidx.core.os.LocaleListCompat
@@ -141,11 +142,14 @@ class LanguagePreferenceAdapter(
141142
142143 if (! isSelected) {
143144 holder.selectedIcon.setImageDrawable(null )
145+ } else {
146+ holder.optionItem.setBackgroundResource(R .color.secondaryContainer)
144147 }
145148 }
146149}
147150
148151class LanguagePreferenceViewHolder (view : View ) : RecyclerView.ViewHolder(view) {
152+ val optionItem: LinearLayout = view.findViewById(R .id.option_language_item)
149153 val localName: TextView = view.findViewById(R .id.option_local_name)
150154 val translatedName: TextView = view.findViewById(R .id.option_translated_name)
151155 val selectedIcon: ImageView = view.findViewById(R .id.icon_selected)
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
2+ <LinearLayout
3+ xmlns : android =" http://schemas.android.com/apk/res/android"
34 xmlns : app =" http://schemas.android.com/apk/res-auto"
45 xmlns : tools =" http://schemas.android.com/tools"
6+ android : id =" @+id/option_language_item"
57 android : layout_width =" match_parent"
68 android : layout_height =" wrap_content"
79 android : background =" ?attr/selectableItemBackground"
4143 android : layout_height =" fill_parent"
4244 android : padding =" 5dp"
4345 android : src =" @drawable/ic_baseline_done_24"
44- app : tint =" @color/colorWhite"
45- tools : tint =" @color/colorAccent" />
46+ app : tint =" @color/textColorPrimary" />
4647</LinearLayout >
Original file line number Diff line number Diff line change 1111 <color name =" textColorPrimary" >@android:color/white</color >
1212 <color name =" textColorSecondary" >@color/colorAccent</color >
1313 <color name =" backgroundColorPrimary" >@color/background_material_dark</color >
14+ <color name =" secondaryContainer" >#4A4458</color >
1415</resources >
Original file line number Diff line number Diff line change 1111 <color name =" textColorPrimary" >@android:color/black</color >
1212 <color name =" textColorSecondary" >@color/colorPrimary</color >
1313 <color name =" backgroundColorPrimary" >@color/background_material_light</color >
14+ <color name =" secondaryContainer" >#E8DEF8</color >
1415</resources >
You can’t perform that action at this time.
0 commit comments