public class

PrecomputedTextCompat.Params.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.core.text.PrecomputedTextCompat.Params.Builder

Overview

A builder for creating PrecomputedTextCompat.Params.

Summary

Constructors
publicBuilder(TextPaint paint)

Builder constructor.

Methods
public PrecomputedTextCompat.Paramsbuild()

Build the PrecomputedTextCompat.Params.

public PrecomputedTextCompat.Params.BuildersetBreakStrategy(int strategy)

Set the line break strategy.

public PrecomputedTextCompat.Params.BuildersetHyphenationFrequency(int frequency)

Set the hyphenation frequency.

public PrecomputedTextCompat.Params.BuildersetTextDirection(TextDirectionHeuristic textDir)

Set the text direction heuristic.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(TextPaint paint)

Builder constructor.

Parameters:

paint: the paint to be used for drawing

Methods

public PrecomputedTextCompat.Params.Builder setBreakStrategy(int strategy)

Set the line break strategy. The default value is Layout. On API 22 and below, this has no effect as there is no line break strategy.

Parameters:

strategy: the break strategy

Returns:

PrecomputedTextCompat.Builder instance

See also: , android.widget.TextView

public PrecomputedTextCompat.Params.Builder setHyphenationFrequency(int frequency)

Set the hyphenation frequency. The default value is Layout. On API 22 and below, this has no effect as there is no hyphenation frequency.

Parameters:

frequency: the hyphenation frequency

Returns:

PrecomputedTextCompat.Builder instance

See also: , android.widget.TextView

public PrecomputedTextCompat.Params.Builder setTextDirection(TextDirectionHeuristic textDir)

Set the text direction heuristic. The default value is . On API 17 or before, text direction heuristics cannot be modified, so this method does nothing.

Parameters:

textDir: the text direction heuristic for resolving bidi behavior

Returns:

PrecomputedTextCompat.Builder instance

See also:

Build the PrecomputedTextCompat.Params.

Returns:

the layout parameter