Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static final class

BidiFormatter.Builder

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BidiFormatter.Builder ()

Constructor.

public BidiFormatter.Builder (boolean rtlContext)

Constructor.

Parameters
rtlContext Whether the context directionality is RTL.

public BidiFormatter.Builder ( Locale locale)

Constructor.

Parameters
locale The context locale.

Public Methods

public BidiFormatter build ()

Returns
  • A BidiFormatter with the specified options.

public 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 the TextDirectionHeuristic to use.
Returns
  • the builder itself.

public 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 false.