BidiFormatter.Builder

Added in 1.1.0

class BidiFormatter.Builder


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

Summary

Public constructors

Constructor.

Builder(locale: Locale!)

Constructor.

Builder(rtlContext: Boolean)

Constructor.

Public functions

BidiFormatter!
BidiFormatter.Builder!

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

BidiFormatter.Builder!
stereoReset(stereoReset: Boolean)

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

Public constructors

Builder

Added in 1.1.0
Builder()

Constructor.

Builder

Added in 1.1.0
Builder(locale: Locale!)

Constructor.

Parameters
locale: Locale!

The context locale.

Builder

Added in 1.1.0
Builder(rtlContext: Boolean)

Constructor.

Parameters
rtlContext: Boolean

Whether the context directionality is RTL.

Public functions

build

Added in 1.1.0
fun build(): BidiFormatter!
Returns
BidiFormatter!

A BidiFormatter with the specified options.

setTextDirectionHeuristic

Added in 1.1.0
fun setTextDirectionHeuristic(heuristic: TextDirectionHeuristicCompat!): BidiFormatter.Builder!

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

Parameters
heuristic: TextDirectionHeuristicCompat!

the TextDirectionHeuristic to use.

Returns
BidiFormatter.Builder!

the builder itself.

stereoReset

Added in 1.1.0
fun stereoReset(stereoReset: Boolean): BidiFormatter.Builder!

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.