FileDocCategorySizeDatePackage
TextDirectionHeuristicsCompat.javaAPI DocAndroid 5.1 API9462Thu Mar 12 22:22:56 GMT 2015android.support.v4.text

TextDirectionHeuristicsCompat

public class TextDirectionHeuristicsCompat extends Object
Some objects that implement TextDirectionHeuristic.

Fields Summary
public static final android.support.v4.text.TextDirectionHeuristicCompat
LTR
Always decides that the direction is left to right.
public static final android.support.v4.text.TextDirectionHeuristicCompat
RTL
Always decides that the direction is right to left.
public static final android.support.v4.text.TextDirectionHeuristicCompat
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. This is the default behavior of the Unicode Bidirectional Algorithm.
public static final android.support.v4.text.TextDirectionHeuristicCompat
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. This is similar to the default behavior of the Unicode Bidirectional Algorithm, just with different fallback behavior.
public static final android.support.v4.text.TextDirectionHeuristicCompat
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.
public static final android.support.v4.text.TextDirectionHeuristicCompat
LOCALE
Force the paragraph direction to the Locale direction. Falls back to left to right.
private static final int
STATE_TRUE
State constants for taking care about true / false / unknown
private static final int
STATE_FALSE
private static final int
STATE_UNKNOWN
Constructors Summary
Methods Summary
private static intisRtlText(int directionality)


         
        switch (directionality) {
            case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
                return STATE_FALSE;
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
                return STATE_TRUE;
            default:
                return STATE_UNKNOWN;
        }
    
private static intisRtlTextOrFormat(int directionality)

        switch (directionality) {
            case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
            case Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING:
            case Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE:
                return STATE_FALSE;
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING:
            case Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE:
                return STATE_TRUE;
            default:
                return STATE_UNKNOWN;
        }