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 |
|---|
public class PrecomputedTextCompat.Params.BuilderA builder for creating |
Public constructors |
|---|
@RequiresApi(value = 28) |
Public methods |
|
|---|---|
boolean |
Check if the same text layout. |
int |
@RequiresApi(value = 23)Returns the break strategy for this text. |
int |
@RequiresApi(value = 23)Returns the hyphenation frequency for this text. |
@Nullable TextDirectionHeuristic |
Returns the |
@NonNull TextPaint |
Returns the |
int |
hashCode() |
String |
toString() |
Public constructors
Params
@RequiresApi(value = 28)
public Params(@NonNull PrecomputedText.Params wrapped)
Public methods
equals
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 = 23)
public int getHyphenationFrequency()
Returns the hyphenation frequency for this text. On API 22 and below, this returns 0.
| Returns | |
|---|---|
int |
the hyphenation frequency |
getTextDirection
public @Nullable TextDirectionHeuristic getTextDirection()
Returns the TextDirectionHeuristic for this text. On API 17 and below, this returns null, otherwise returns non-null TextDirectionHeuristic.
| Returns | |
|---|---|
@Nullable TextDirectionHeuristic |
getTextPaint
public @NonNull TextPaint getTextPaint()
Returns the TextPaint for this text.