2016-06-29 15:47:52 +02:00
|
|
|
package org.mariotaku.ktextension
|
|
|
|
|
2017-01-28 08:15:35 +01:00
|
|
|
import android.graphics.Typeface
|
2016-06-29 15:47:52 +02:00
|
|
|
import android.widget.TextView
|
|
|
|
|
|
|
|
val TextView.empty: Boolean
|
|
|
|
get() = length() <= 0
|
2017-01-28 08:15:35 +01:00
|
|
|
|
|
|
|
fun TextView.applyFontFamily(lightFont: Boolean) {
|
|
|
|
if (lightFont) {
|
2017-02-02 11:18:34 +01:00
|
|
|
typeface = Typeface.create("sans-serif-light", typeface?.style ?: Typeface.NORMAL)
|
2017-01-28 08:15:35 +01:00
|
|
|
}
|
|
|
|
}
|