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 |
Public constructors | |
|---|---|
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 |
TextPaint
|
getTextPaint()
Returns the |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
|---|---|
Public constructors
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
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
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 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
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 |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-05-14 UTC.