diff options
Diffstat (limited to 'library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt')
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt b/library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt index d47d133..4bb72a8 100644 --- a/library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt +++ b/library/src/main/kotlin/ca/allanwang/kau/utils/IIconUtils.kt @@ -11,9 +11,10 @@ import com.mikepenz.iconics.typeface.IIcon /** * Created by Allan Wang on 2017-05-29. */ -fun IIcon.toDrawable(c: Context, sizeDp: Int = 24, @ColorInt color: Int = Color.WHITE): Drawable { +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) icon.setTintList(state) + icon.builder() return icon }
\ No newline at end of file |