Most visited

Recently visited

Added in API level 18

BidiFormatter.Builder

public static final class BidiFormatter.Builder
extends Object

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


使用非默认选项构建BidiFormatter的类。

Summary

Public constructors

BidiFormatter.Builder()

构造函数。

BidiFormatter.Builder(boolean rtlContext)

构造函数。

BidiFormatter.Builder(Locale locale)

构造函数。

Public methods

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

指定BidiFormatter将使用的默认方向性估计算法。

BidiFormatter.Builder stereoReset(boolean stereoReset)

指定要构建的BidiFormatter是否也应该在字符串被双向包装之前“重置”方向性,而不仅仅是在它之后。

Inherited methods

From class java.lang.Object

Public constructors

BidiFormatter.Builder

Added in API level 18
BidiFormatter.Builder ()

构造函数。

BidiFormatter.Builder

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

构造函数。

Parameters
rtlContext boolean: Whether the context directionality is RTL.

BidiFormatter.Builder

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

构造函数。

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)

指定BidiFormatter将使用的默认方向性估计算法。 默认情况下,使用第一强启发式。

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

stereoReset

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

指定要构建的BidiFormatter是否也应该在字符串被双向包装之前“重置”方向性,而不仅仅是在它之后。 默认值是true。

Parameters
stereoReset boolean
Returns
BidiFormatter.Builder

Hooray!