added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.0.0-beta01

PrecomputedTextCompat.Params

public static final class PrecomputedTextCompat.Params
extends Object

java.lang.Object
   ↳ 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 TextView or StaticLayout, when final layout constraints are not known.

Summary

Nested classes

class PrecomputedTextCompat.Params.Builder

A builder for creating PrecomputedTextCompat.Params

Public constructors

PrecomputedTextCompat.Params(PrecomputedText.Params wrapped)

Public methods

boolean equals(Object o)

Check if the same text layout.

int getBreakStrategy()

Returns the break strategy for this text.

int getHyphenationFrequency()

Returns the hyphenation frequency for this text.

TextDirectionHeuristic getTextDirection()

Returns the TextDirectionHeuristic for this text.

TextPaint getTextPaint()

Returns the TextPaint for this text.

int hashCode()
String toString()

Inherited methods

Public constructors

PrecomputedTextCompat.Params

added in version 1.0.0
public PrecomputedTextCompat.Params (PrecomputedText.Params wrapped)

Parameters
wrapped PrecomputedText.Params

Public methods

equals

public boolean equals (Object o)

Check if the same text layout.

Parameters
o Object

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

getBreakStrategy

added in version 1.0.0
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

added in version 1.0.0
public int getHyphenationFrequency ()

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

Returns
int the hyphenation frequency

getTextDirection

added in version 1.0.0
public TextDirectionHeuristic getTextDirection ()

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

Returns
TextDirectionHeuristic the TextDirectionHeuristic

getTextPaint

added in version 1.0.0
public TextPaint getTextPaint ()

Returns the TextPaint for this text.

Returns
TextPaint A TextPaint

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String