Skip to content

Most visited

Recently visited

navigation

BidiFormatter.Builder

public static final class BidiFormatter.Builder
extends Object

java.lang.Object
   ↳ android.text.BidiFormatter.Builder


A class for building a BidiFormatter with non-default options.

Summary

Public constructors

BidiFormatter.Builder()

Constructor.

BidiFormatter.Builder(boolean rtlContext)

Constructor.

BidiFormatter.Builder(Locale locale)

Constructor.

Public methods

BidiFormatter build()
BidiFormatter.Builder setTextDirectionHeuristic(TextDirectionHeuristic heuristic)

Specifies the default directionality estimation algorithm to be used by the BidiFormatter.

BidiFormatter.Builder stereoReset(boolean stereoReset)

Specifies whether the BidiFormatter to be built should also "reset" directionality before a string being bidi-wrapped, not just after it.

Inherited methods

From class java.lang.Object

Public constructors

BidiFormatter.Builder

Added in API level 18
BidiFormatter.Builder ()

Constructor.

BidiFormatter.Builder

Added in API level 18
BidiFormatter.Builder (boolean rtlContext)

Constructor.

Parameters
rtlContext boolean: Whether the context directionality is RTL.

BidiFormatter.Builder

Added in API level 18
BidiFormatter.Builder (Locale locale)

Constructor.

Parameters
locale Locale: The context locale.

Public methods

build

Added in API level 18
BidiFormatter build ()

Returns
BidiFormatter A BidiFormatter with the specified options.

setTextDirectionHeuristic

Added in API level 18
BidiFormatter.Builder setTextDirectionHeuristic (TextDirectionHeuristic heuristic)

Specifies the default directionality estimation algorithm to be used by the BidiFormatter. By default, uses the first-strong heuristic.

Parameters
heuristic TextDirectionHeuristic: the TextDirectionHeuristic to use.
Returns
BidiFormatter.Builder the builder itself.

stereoReset

Added in API level 18
BidiFormatter.Builder stereoReset (boolean stereoReset)

Specifies whether the BidiFormatter to be built should also "reset" directionality before a string being bidi-wrapped, not just after it. The default is true.

Parameters
stereoReset boolean
Returns
BidiFormatter.Builder
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.