# Print output for @column tags ?> PrecomputedText.Params.Builder - Android SDK | Android Developers

Most visited


Recently visited


PrecomputedText.Params.Builder

public static class PrecomputedText.Params.Builder
extends Object

java.lang.Object
   ↳ android.text.PrecomputedText.Params.Builder


A builder for creating Params.

Summary


Public constructors

Builder(TextPaint paint)

Builder constructor.

Builder(PrecomputedText.Params params)

Builder constructor from existing params.

Public methods

PrecomputedText.Params build()

Build the Params.

PrecomputedText.Params.Builder setBreakStrategy(int strategy)

Set the line break strategy.

PrecomputedText.Params.Builder setHyphenationFrequency(int frequency)

Set the hyphenation frequency.

PrecomputedText.Params.Builder setTextDirection(TextDirectionHeuristic textDir)

Set the text direction heuristic.

Inherited methods

Public constructors


Builder

public Builder (TextPaint paint)

Builder constructor.

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

Builder

public Builder (PrecomputedText.Params params)

Builder constructor from existing params.

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

Public methods


build

public PrecomputedText.Params build ()

Build the Params.

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

setBreakStrategy

public PrecomputedText.Params.Builder setBreakStrategy (int strategy)

Set the line break strategy. The default value is Layout#BREAK_STRATEGY_HIGH_QUALITY.

Parameters
strategy int: the break strategy Value is LineBreaker.BREAK_STRATEGY_SIMPLE, LineBreaker.BREAK_STRATEGY_HIGH_QUALITY, or LineBreaker.BREAK_STRATEGY_BALANCED

Returns
PrecomputedText.Params.Builder this builder, useful for chaining

See also:

setHyphenationFrequency

public PrecomputedText.Params.Builder setHyphenationFrequency (int frequency)

Set the hyphenation frequency. The default value is Layout#HYPHENATION_FREQUENCY_NORMAL.

Parameters
frequency int: the hyphenation frequency Value is Layout.HYPHENATION_FREQUENCY_NORMAL, Layout.HYPHENATION_FREQUENCY_FULL, or Layout.HYPHENATION_FREQUENCY_NONE

Returns
PrecomputedText.Params.Builder this builder, useful for chaining

See also:

setTextDirection

public PrecomputedText.Params.Builder setTextDirection (TextDirectionHeuristic textDir)

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.

Returns
PrecomputedText.Params.Builder this builder, useful for chaining

See also:

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.