aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
index 908c139..bd245af 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
@@ -1,5 +1,6 @@
package ca.allanwang.kau.kpref.activity.items
+import android.annotation.SuppressLint
import android.support.annotation.CallSuper
import android.support.annotation.IdRes
import android.support.annotation.LayoutRes
@@ -31,6 +32,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor
override final fun getViewHolder(v: View) = ViewHolder(v)
+ @SuppressLint("NewApi")
@CallSuper
override fun bindView(viewHolder: ViewHolder, payloads: List<Any>) {
super.bindView(viewHolder, payloads)
@@ -50,7 +52,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor
desc?.setTextColor(textColor)
}
val accentColor = core.globalOptions.accentColor?.invoke()
- if (accentColor != null) {
+ if (accentColor != null && buildIsLollipopAndUp) {
icon?.drawable?.setTint(accentColor)
}
onPostBindView(this, textColor, accentColor)