add a drawable extension for applying color filter
This commit is contained in:
parent
db016cad04
commit
735dfd2054
1 changed files with 6 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
|||
package com.simplemobiletools.commons.extensions
|
||||
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.drawable.Drawable
|
||||
|
||||
fun Drawable.applyColorFilter(color: Int) = mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN)
|
Loading…
Reference in a new issue