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 |
Public constructors | |
---|---|
Public methods | |
---|---|
Boolean |
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 |
TextPaint |
Returns the |
Int |
hashCode() |
String |
toString() |
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
@RequiresApi(23) 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
@RequiresApi(23) fun getHyphenationFrequency(): Int
Returns the hyphenation frequency for this text. On API 22 and below, this returns 0.
Return | |
---|---|
Int |
the hyphenation frequency |
getTextDirection
@RequiresApi(18) @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