From 55be9b9ca5f281bfd42c9670fe97631407b720a0 Mon Sep 17 00:00:00 2001 From: inorichi Date: Mon, 15 May 2017 16:32:53 +0200 Subject: [PATCH] Fix settings crashes before Lollipop --- .../main/java/eu/kanade/tachiyomi/ui/setting/PreferenceDSL.kt | 3 ++- app/src/main/res/values/colors.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/PreferenceDSL.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/PreferenceDSL.kt index 0c496f0eb..df1e41cba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/PreferenceDSL.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/PreferenceDSL.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.ui.setting import android.content.Context +import android.support.graphics.drawable.VectorDrawableCompat import android.support.v4.graphics.drawable.DrawableCompat import android.support.v7.preference.* import eu.kanade.tachiyomi.widget.preference.IntListPreference @@ -83,7 +84,7 @@ var Preference.titleRes: Int var Preference.iconRes: Int get() = 0 // set only - set(value) { setIcon(value) } + set(value) { icon = VectorDrawableCompat.create(context.resources, value, context.theme) } var Preference.summaryRes: Int get() = 0 // set only diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 30a1487d0..8aa48821c 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -12,6 +12,7 @@ @color/md_black_1000_12 @color/md_black_1000_12 + @color/colorAccentLight @color/md_grey_300 @color/md_grey_100