Package icyllis.modernui.text
Class PrecomputedText.Params.Builder
java.lang.Object
icyllis.modernui.text.PrecomputedText.Params.Builder
- Enclosing class:
PrecomputedText.Params
A builder for creating
PrecomputedText.Params
.-
Constructor Summary
ConstructorDescriptionBuilder
(PrecomputedText.Params params) Builder constructor from existing params.Builder constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build thePrecomputedText.Params
.setLineBreakConfig
(LineBreakConfig lineBreakConfig) Set the line break config for the text wrapping.setTextDirection
(TextDirectionHeuristic textDir) Set the text direction heuristic.
-
Constructor Details
-
Builder
Builder constructor.- Parameters:
paint
- the paint to be used for drawing
-
Builder
Builder constructor from existing params.
-
-
Method Details
-
setTextDirection
Set the text direction heuristic.The default value is
TextDirectionHeuristics.FIRSTSTRONG_LTR
.- Parameters:
textDir
- the text direction heuristic for resolving bidi behavior- Returns:
- this builder, useful for chaining
- See Also:
-
setLineBreakConfig
@NonNull public PrecomputedText.Params.Builder setLineBreakConfig(@NonNull LineBreakConfig lineBreakConfig) Set the line break config for the text wrapping.- Parameters:
lineBreakConfig
- the newly line break configuration.- Returns:
- this builder, useful for chaining.
- See Also:
-
build
Build thePrecomputedText.Params
.- Returns:
- the layout parameter
-