TextUIConfig

A configurations of text. This provides a way of applying com.google.android.material.resources.TextAppearance into this class's properties. A background color property is not applied automatically because background attributes is not a property of com.google.android.material.resources.TextAppearance.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Apply values in the given TextUIConfig into this.

fun apply(context: Context, text: String): SpannableString

Apply values into given whole text.

Link copied to clipboard
fun bind(context: Context, spannable: Spannable, start: Int, end: Int)

Apply values into Spannable text.

Link copied to clipboard

Generates typeface from text style.

Link copied to clipboard
fun mergeFromTextAppearance(context: Context, @StyleRes textAppearance: Int, @ColorRes textBackgroundColor: Int = 0)

Merge attributes into this instance's values by given com.google.android.material.resources.TextAppearance and background color.

Properties

Link copied to clipboard

Returns a custom font res ID.

Link copied to clipboard

Returns a value of text typeface family.

Link copied to clipboard

Returns a value of background color int.

Link copied to clipboard

Returns a value of text color int.

Link copied to clipboard

Returns a value of text size int.

Link copied to clipboard

Returns a value of android.graphics.Typeface.