aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-13 00:51:31 -0700
committerAllan Wang <me@allanwang.ca>2019-06-13 00:51:31 -0700
commit423cad016753a795e9cb75534d172f562e4326c1 (patch)
treeecd4ffcaec76683534b06845fe7b10eb973ee2de /core/src/main/kotlin
parent6163bd66050ef22921b21a9a528bd090986795d6 (diff)
downloadkau-423cad016753a795e9cb75534d172f562e4326c1.tar.gz
kau-423cad016753a795e9cb75534d172f562e4326c1.tar.bz2
kau-423cad016753a795e9cb75534d172f562e4326c1.zip
Update iconics to 4.x.x
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
index 8b40352..52ea57d 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
@@ -16,11 +16,12 @@
package ca.allanwang.kau.utils
import android.content.Context
-import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.drawable.Drawable
import androidx.annotation.ColorInt
import com.mikepenz.iconics.IconicsDrawable
+import com.mikepenz.iconics.colorInt
+import com.mikepenz.iconics.sizeDp
import com.mikepenz.iconics.typeface.IIcon
/**
@@ -33,8 +34,7 @@ fun IIcon.toDrawable(
@ColorInt color: Int = Color.WHITE,
builder: IconicsDrawable.() -> Unit = {}
): Drawable {
- val state = ColorStateList.valueOf(color)
- val icon = IconicsDrawable(c).icon(this).color(state)
+ val icon = IconicsDrawable(c).icon(this).colorInt(color)
if (sizeDp > 0) icon.sizeDp(sizeDp)
icon.builder()
return icon