android.support.v4.text
Class BidiFormatter.Builder

java.lang.Object
  extended by android.support.v4.text.BidiFormatter.Builder
Enclosing class:
BidiFormatter

public static final class BidiFormatter.Builder
extends java.lang.Object

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


Constructor Summary
BidiFormatter.Builder()
          Constructor.
BidiFormatter.Builder(boolean rtlContext)
          Constructor.
BidiFormatter.Builder(java.util.Locale locale)
          Constructor.
 
Method Summary
 BidiFormatter build()
           
 BidiFormatter.Builder setTextDirectionHeuristic(TextDirectionHeuristicCompat 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BidiFormatter.Builder

public BidiFormatter.Builder()
Constructor.


BidiFormatter.Builder

public BidiFormatter.Builder(boolean rtlContext)
Constructor.

Parameters:
rtlContext - Whether the context directionality is RTL.

BidiFormatter.Builder

public BidiFormatter.Builder(java.util.Locale locale)
Constructor.

Parameters:
locale - The context locale.
Method Detail

stereoReset

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.


setTextDirectionHeuristic

public BidiFormatter.Builder setTextDirectionHeuristic(TextDirectionHeuristicCompat 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.

build

public BidiFormatter build()
Returns:
A BidiFormatter with the specified options.