Added in API level 28

Builder

class Builder
kotlin.Any
   ↳ android.text.PrecomputedText.Params.Builder

A builder for creating Params.

Summary

Public constructors

Builder constructor.

Builder constructor from existing params.

Public methods
open PrecomputedText.Params

Build the Params.

open PrecomputedText.Params.Builder!
setBreakStrategy(strategy: Int)

Set the line break strategy.

open PrecomputedText.Params.Builder!

Set the hyphenation frequency.

open PrecomputedText.Params.Builder

Set the line break config for the text wrapping.

open PrecomputedText.Params.Builder!

Set the text direction heuristic.

Public constructors

Builder

Added in API level 28
Builder(paint: TextPaint)

Builder constructor.

Parameters
paint TextPaint: the paint to be used for drawing This value cannot be null.

Builder

Added in API level 28
Builder(params: PrecomputedText.Params)

Builder constructor from existing params.

Parameters
params PrecomputedText.Params: This value cannot be null.

Public methods

build

Added in API level 28
open fun build(): PrecomputedText.Params

Build the Params.

Return
PrecomputedText.Params the layout parameter This value cannot be null.

setLineBreakConfig

Added in API level 33
open fun setLineBreakConfig(lineBreakConfig: LineBreakConfig): PrecomputedText.Params.Builder

Set the line break config for the text wrapping.

Parameters
lineBreakConfig LineBreakConfig: the newly line break configuration. This value cannot be null.
Return
PrecomputedText.Params.Builder this builder, useful for chaining. This value cannot be null.

setTextDirection

Added in API level 28
open fun setTextDirection(textDir: TextDirectionHeuristic): PrecomputedText.Params.Builder!

Set the text direction heuristic. The default value is TextDirectionHeuristics#FIRSTSTRONG_LTR.

Parameters
textDir TextDirectionHeuristic: the text direction heuristic for resolving bidi behavior This value cannot be null.
Return
PrecomputedText.Params.Builder! this builder, useful for chaining