Params

class Params
kotlin.Any
   ↳ androidx.core.text.PrecomputedTextCompat.Params

The information required for building PrecomputedTextCompat. Contains information required for precomputing text measurement metadata, so it can be done in isolation of a android.widget.TextView or StaticLayout, when final layout constraints are not known.

Summary

Nested classes

A builder for creating Params.

Public constructors
<init>(wrapped: Params)

Public methods
Int

Boolean
equals(other: Any?)

Check if the same text layout.

TextPaint

Returns the TextPaint for this text.

TextDirectionHeuristic?

Returns the TextDirectionHeuristic for this text.

String

Int

Returns the hyphenation frequency for this text.

Int

Returns the break strategy for this text.

Public constructors

<init>

Params(wrapped: Params)

Public methods

hashCode

fun hashCode(): Int

equals

fun equals(other: Any?): Boolean

Check if the same text layout.

Return
Boolean: true if this and the given param result in the same text layout

getTextPaint

fun getTextPaint(): TextPaint

Returns the TextPaint for this text.

Return
TextPaint: A TextPaint

getTextDirection

fun getTextDirection(): TextDirectionHeuristic?

Returns the TextDirectionHeuristic for this text. On API 17 and below, this returns null, otherwise returns non-null TextDirectionHeuristic.

Return
TextDirectionHeuristic?: the TextDirectionHeuristic

toString

fun toString(): String

getHyphenationFrequency

fun getHyphenationFrequency(): Int

Returns the hyphenation frequency for this text. On API 22 and below, this returns 0.

Return
Int: the hyphenation frequency

getBreakStrategy

fun getBreakStrategy(): Int

Returns the break strategy for this text. On API 22 and below, this returns 0.

Return
Int: the line break strategy