java.lang.Object | |
↳ | android.text.TextDirectionHeuristics |
Some objects that implement
TextDirectionHeuristic
. Use these with
the
unicodeWrap()
methods in
BidiFormatter
.
Also notice that these direction heuristics correspond to the same types of constants
provided in the
View
class for
setTextDirection()
, such as
TEXT_DIRECTION_RTL
.
To support versions lower than
JELLY_BEAN_MR2
,
you can use the support library's
TextDirectionHeuristicsCompat
class.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
ANYRTL_LTR | If the text contains any strong right to left non-format character, determines that the direction is right to left, falling back to left to right if it finds none. | |||||||||
|
FIRSTSTRONG_LTR | Determines the direction based on the first strong directional character, including bidi format chars, falling back to left to right if it finds none. | |||||||||
|
FIRSTSTRONG_RTL | Determines the direction based on the first strong directional character, including bidi format chars, falling back to right to left if it finds none. | |||||||||
|
LOCALE | Force the paragraph direction to the Locale direction. | |||||||||
|
LTR | Always decides that the direction is left to right. | |||||||||
|
RTL | Always decides that the direction is right to left. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
If the text contains any strong right to left non-format character, determines that the direction is right to left, falling back to left to right if it finds none.
Determines the direction based on the first strong directional character, including bidi format chars, falling back to left to right if it finds none. This is the default behavior of the Unicode Bidirectional Algorithm.
Determines the direction based on the first strong directional character, including bidi format chars, falling back to right to left if it finds none. This is similar to the default behavior of the Unicode Bidirectional Algorithm, just with different fallback behavior.
Force the paragraph direction to the Locale direction. Falls back to left to right.
Always decides that the direction is left to right.
Always decides that the direction is right to left.