aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
committerAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
commit71f5dc2f7ce5b8183421586e6a77be65040a4dff (patch)
treefedd18e271463ce2430637a9913e8470e84181ce /core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
parentf94d6f9694973c2a323e565794d948002593df0a (diff)
downloadkau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.gz
kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.bz2
kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.zip
Format everything and use reified generics
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt3
1 files changed, 2 insertions, 1 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 4c71945..a8c710e 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt
@@ -11,7 +11,8 @@ import com.mikepenz.iconics.typeface.IIcon
/**
* Created by Allan Wang on 2017-05-29.
*/
-@KauUtils fun IIcon.toDrawable(c: Context, sizeDp: Int = 24, @ColorInt color: Int = Color.WHITE, builder: IconicsDrawable.() -> Unit = {}): Drawable {
+@KauUtils
+fun IIcon.toDrawable(c: Context, sizeDp: Int = 24, @ColorInt color: Int = Color.WHITE, builder: IconicsDrawable.() -> Unit = {}): Drawable {
val state = ColorStateList.valueOf(color)
val icon = IconicsDrawable(c).icon(this).sizeDp(sizeDp).color(state)
icon.builder()