PrecomputedTextCompat.Params

Added in 1.1.0

class 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 types

A builder for creating Params.

Public constructors

@RequiresApi(value = 28)
Params(wrapped: PrecomputedText.Params)

Public functions

Boolean
equals(o: Any?)

Check if the same text layout.

Int

Returns the break strategy for this text.

Int

Returns the hyphenation frequency for this text.

TextDirectionHeuristic?

Returns the TextDirectionHeuristic for this text.

TextPaint

Returns the TextPaint for this text.

Int
String!

Public constructors

Params

Added in 1.1.0
@RequiresApi(value = 28)
Params(wrapped: PrecomputedText.Params)

Public functions

equals

fun equals(o: Any?): Boolean

Check if the same text layout.

Returns
Boolean

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

getBreakStrategy

Added in 1.1.0
@RequiresApi(value = 23)
fun getBreakStrategy(): Int

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

Returns
Int

the line break strategy

getHyphenationFrequency

Added in 1.1.0
@RequiresApi(value = 23)
fun getHyphenationFrequency(): Int

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

Returns
Int

the hyphenation frequency

getTextDirection

Added in 1.1.0
fun getTextDirection(): TextDirectionHeuristic?

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

getTextPaint

Added in 1.1.0
fun getTextPaint(): TextPaint

Returns the TextPaint for this text.

Returns
TextPaint

A TextPaint

hashCode

fun hashCode(): Int

toString

fun toString(): String!