Skip to content

Commit 37c301e

Browse files
committed
Add from fun for CharSequenceText
1 parent f868b69 commit 37c301e

File tree

1 file changed

+5
-0
lines changed
  • omegatypes/src/main/java/com/omega_r/libs/omegatypes

1 file changed

+5
-0
lines changed

omegatypes/src/main/java/com/omega_r/libs/omegatypes/Text.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ open class Text(protected val defaultTextStyle: TextStyle?) : Serializable {
2424
@JvmOverloads
2525
fun from(string: String, textStyle: TextStyle? = null): Text = StringText(string, textStyle)
2626

27+
28+
@JvmStatic
29+
@JvmOverloads
30+
fun from(charSequence: CharSequence, textStyle: TextStyle? = null): Text = CharSequenceText(charSequence, textStyle)
31+
2732
@JvmStatic
2833
@JvmOverloads
2934
fun from(stringRes: Int, textStyle: TextStyle? = null): Text = ResourceText(stringRes, textStyle)

0 commit comments

Comments
 (0)