|
|
@ -51,7 +51,7 @@ class IconListPreference(context: Context, attrs: AttributeSet) : ListPreference |
|
|
|
super.onBindViewHolder(holder) |
|
|
|
super.onBindViewHolder(holder) |
|
|
|
holder?.itemView?.findViewById<ImageView>(R.id.preview)?.let { |
|
|
|
holder?.itemView?.findViewById<ImageView>(R.id.preview)?.let { |
|
|
|
val selectedIndex = findIndexOfValue(value) |
|
|
|
val selectedIndex = findIndexOfValue(value) |
|
|
|
if (selectedIndex > 0) { |
|
|
|
if (selectedIndex >= 0) { |
|
|
|
val drawable = mEntryDrawables[selectedIndex] |
|
|
|
val drawable = mEntryDrawables[selectedIndex] |
|
|
|
it.setImageDrawable(drawable) |
|
|
|
it.setImageDrawable(drawable) |
|
|
|
} |
|
|
|
} |
|
|
|