We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89dee9e commit 5ece050Copy full SHA for 5ece050
omegatypes/src/main/java/com/omega_r/libs/omegatypes/Text.kt
@@ -60,12 +60,14 @@ open class Text(protected val defaultTextStyle: TextStyle?) : Serializable {
60
61
open fun getString(context: Context): String? = null
62
63
+ @JvmOverloads
64
open fun getCharSequence(context: Context, textStyle: TextStyle? = null): CharSequence? {
65
return getString(context)?.let {
66
(defaultTextStyle + textStyle)?.applyStyle(context, it) ?: it
67
}
68
69
70
71
open fun applyTo(textView: TextView, textStyle: TextStyle? = null) {
72
textView.text = getCharSequence(textView.context, textStyle)
73
0 commit comments