PrecomputedTextCompat.Params

public final 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

PrecomputedTextCompat.Params.Builder

A builder for creating Params.

Public constructors

Public methods

@Override boolean

Check if the same text layout.

@RequiresApi(value = 23) int

Returns the break strategy for this text.

@RequiresApi(value = 23) int

Returns the hyphenation frequency for this text.

@RequiresApi(value = 18) @Nullable TextDirectionHeuristic

Returns the TextDirectionHeuristic for this text.

@NonNull TextPaint

Returns the TextPaint for this text.

@Override int
@Override String

Public constructors

Params

@RequiresApi(value = 28)
public Params(@NonNull PrecomputedText.Params wrapped)

Public methods

equals

@Override
public boolean equals(@Nullable Object o)

Check if the same text layout.

Returns
boolean

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

getBreakStrategy

@RequiresApi(value = 23)
public int getBreakStrategy()

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

Returns
int

the line break strategy

getHyphenationFrequency

@RequiresApi(value =&n