mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-04-13 09:52:14 +02:00
12 lines
360 B
Kotlin
12 lines
360 B
Kotlin
package com.simplemobiletools.clock.extensions
|
|
|
|
import android.widget.TextView
|
|
import com.simplemobiletools.commons.extensions.applyColorFilter
|
|
|
|
fun TextView.colorCompoundDrawable(color: Int) {
|
|
compoundDrawables.filterNotNull().forEach { drawable ->
|
|
drawable.applyColorFilter(color)
|
|
setCompoundDrawables(drawable, null, null, null)
|
|
}
|
|
}
|