Package icyllis.modernui.text
Class PrecomputedText.Params
java.lang.Object
icyllis.modernui.text.PrecomputedText.Params
- Enclosing class:
PrecomputedText
The information required for building
PrecomputedText.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for creatingPrecomputedText.Params.static @interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for returning value of checkResultUsable indicating that given parameter is not compatible but partially usable for creating new PrecomputedText.static final intConstant for returning value of checkResultUsable indicating that given parameter is not compatible.static final intConstant for returning value of checkResultUsable indicating that given parameter is compatible. -
Constructor Summary
ConstructorsConstructorDescriptionParams(TextPaint paint, LineBreakConfig lineBreakConfig, TextDirectionHeuristic textDir) -
Method Summary
Modifier and TypeMethodDescriptionintcheckResultUsable(TextPaint paint, TextDirectionHeuristic textDir, LineBreakConfig lbConfig) booleanCheck if the same text layout.Returns theLineBreakConfigfor this text.Returns theTextDirectionHeuristicfor this text.Returns theTextPaintfor this text.inthashCode()toString()
-
Field Details
-
UNUSABLE
@Internal public static final int UNUSABLEConstant for returning value of checkResultUsable indicating that given parameter is not compatible.- See Also:
-
NEED_RECOMPUTE
@Internal public static final int NEED_RECOMPUTEConstant for returning value of checkResultUsable indicating that given parameter is not compatible but partially usable for creating new PrecomputedText.- See Also:
-
USABLE
@Internal public static final int USABLEConstant for returning value of checkResultUsable indicating that given parameter is compatible.- See Also:
-
-
Constructor Details
-
Params
@Internal public Params(@NonNull TextPaint paint, @NonNull LineBreakConfig lineBreakConfig, @NonNull TextDirectionHeuristic textDir)
-
-
Method Details
-
getTextPaint
Returns theTextPaintfor this text.- Returns:
- A
TextPaint
-
getTextDirection
Returns theTextDirectionHeuristicfor this text.- Returns:
- A
TextDirectionHeuristic
-
getLineBreakConfig
Returns theLineBreakConfigfor this text.- Returns:
- the current line break configuration. The
LineBreakConfigwith default values will be returned if no line break configuration is set.
-
checkResultUsable
@Internal public int checkResultUsable(@NonNull TextPaint paint, @NonNull TextDirectionHeuristic textDir, @NonNull LineBreakConfig lbConfig) -
equals
Check if the same text layout. -
hashCode
public int hashCode() -
toString
-