kutils / com.celites.kutils / android.graphics.drawable.Drawable / applyTinting

applyTinting

fun Drawable.applyTinting(color: Int): Drawable

Apply Tint to drawable, this method returns a drawable that you have to use when you need tinted drawable.

Parameters

color - Tint Color to apply

Return
Tinted Drawable, use this

Receiver
Drawable to apply tint To

fun Drawable.applyTinting(@ColorRes colorRes: Int, context: Context): Drawable

Apply Tint to drawable, where color is pointed from Resource. This method returns a drawable that you have to use when you need tinted drawable.

Parameters

colorRes - Color Resource to apply tint

context - Context to get Color from Resource

Return
Tinted Drawable

Receiver
Drawable to apply tint To