The Android Developer Challenge is back! Submit your idea before December 2.

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>(@NonNull wrapped: Params)

Public methods

Boolean
equals(@Nullable other: 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

<init>

Params(@NonNull wrapped: Params)

Public methods

equals

fun equals(@Nullable other: Any?): Boolean

Check if the same text layout.

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

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

getHyphenationFrequency

fun getHyphenationFrequency(): Int

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

Return
Int: the hyphenation frequency

getTextDirection

@Nullable 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

getTextPaint

@NonNull fun getTextPaint(): TextPaint

Returns the TextPaint for this text.

Return
TextPaint: A TextPaint

hashCode

fun hashCode(): Int

toString

fun toString(): String