diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/text/TextDirectionHeuristics.java | 18 | ||||
-rw-r--r-- | core/java/android/view/View.java | 14 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 2 |
3 files changed, 7 insertions, 27 deletions
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java index e5c1e5b..ae41eab 100644 --- a/core/java/android/text/TextDirectionHeuristics.java +++ b/core/java/android/text/TextDirectionHeuristics.java @@ -17,13 +17,10 @@ package android.text; -import java.util.Locale; - import android.util.LocaleUtil; /** * Some objects that implement TextDirectionHeuristic. - * @hide */ public class TextDirectionHeuristics { @@ -74,9 +71,8 @@ public class TextDirectionHeuristics { * Computes the text direction based on an algorithm. Subclasses implement * {@link #defaultIsRtl} to handle cases where the algorithm cannot determine the * direction from the text alone. - * @hide */ - public static abstract class TextDirectionHeuristicImpl implements TextDirectionHeuristic { + private static abstract class TextDirectionHeuristicImpl implements TextDirectionHeuristic { private final TextDirectionAlgorithm mAlgorithm; public TextDirectionHeuristicImpl(TextDirectionAlgorithm algorithm) { @@ -157,13 +153,11 @@ public class TextDirectionHeuristics { /** * Interface for an algorithm to guess the direction of a paragraph of text. * - * @hide */ - public static interface TextDirectionAlgorithm { + private static interface TextDirectionAlgorithm { /** * Returns whether the range of text is RTL according to the algorithm. * - * @hide */ TriState checkRtl(char[] text, int start, int count); } @@ -173,9 +167,8 @@ public class TextDirectionHeuristics { * the paragraph direction. This is the standard Unicode Bidirectional * algorithm. * - * @hide */ - public static class FirstStrong implements TextDirectionAlgorithm { + private static class FirstStrong implements TextDirectionAlgorithm { @Override public TriState checkRtl(char[] text, int start, int count) { TriState result = TriState.UNKNOWN; @@ -196,9 +189,8 @@ public class TextDirectionHeuristics { * character (e.g. excludes LRE, LRO, RLE, RLO) to determine the * direction of text. * - * @hide */ - public static class AnyStrong implements TextDirectionAlgorithm { + private static class AnyStrong implements TextDirectionAlgorithm { private final boolean mLookForRtl; @Override @@ -239,7 +231,7 @@ public class TextDirectionHeuristics { /** * Algorithm that uses the Locale direction to force the direction of a paragraph. */ - public static class TextDirectionHeuristicLocale extends TextDirectionHeuristicImpl { + private static class TextDirectionHeuristicLocale extends TextDirectionHeuristicImpl { public TextDirectionHeuristicLocale() { super(null); diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 056be7f..ba1b7af 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -2618,7 +2618,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal /** * Text direction is inherited thru {@link ViewGroup} - * @hide */ public static final int TEXT_DIRECTION_INHERIT = 0; @@ -2627,7 +2626,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * determines the paragraph direction. If there is no strong directional character, the * paragraph direction is the view's resolved layout direction. * - * @hide */ public static final int TEXT_DIRECTION_FIRST_STRONG = 1; @@ -2636,42 +2634,36 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * any strong RTL character, otherwise it is LTR if it contains any strong LTR characters. * If there are neither, the paragraph direction is the view's resolved layout direction. * - * @hide */ public static final int TEXT_DIRECTION_ANY_RTL = 2; /** * Text direction is forced to LTR. * - * @hide */ public static final int TEXT_DIRECTION_LTR = 3; /** * Text direction is forced to RTL. * - * @hide */ public static final int TEXT_DIRECTION_RTL = 4; /** * Text direction is coming from the system Locale. * - * @hide */ public static final int TEXT_DIRECTION_LOCALE = 5; /** * Default text direction is inherited * - * @hide */ protected static int DEFAULT_TEXT_DIRECTION = TEXT_DIRECTION_INHERIT; /** * The text direction that has been defined by {@link #setTextDirection(int)}. * - * {@hide} */ @ViewDebug.ExportedProperty(category = "text", mapping = { @ViewDebug.IntToString(from = TEXT_DIRECTION_INHERIT, to = "INHERIT"), @@ -2689,7 +2681,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * not TEXT_DIRECTION_INHERIT, otherwise resolution proceeds up the parent * chain of the view. * - * {@hide} */ @ViewDebug.ExportedProperty(category = "text", mapping = { @ViewDebug.IntToString(from = TEXT_DIRECTION_INHERIT, to = "INHERIT"), @@ -14106,7 +14097,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * - * @hide */ public int getTextDirection() { return mTextDirection; @@ -14124,7 +14114,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * - * @hide */ public void setTextDirection(int textDirection) { if (textDirection != mTextDirection) { @@ -14145,7 +14134,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #TEXT_DIRECTION_RTL}, * {@link #TEXT_DIRECTION_LOCALE}, * - * @hide */ public int getResolvedTextDirection() { if (mResolvedTextDirection == TEXT_DIRECTION_INHERIT) { @@ -14157,7 +14145,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal /** * Resolve the text direction. * - * @hide */ protected void resolveTextDirection() { if (mTextDirection != TEXT_DIRECTION_INHERIT) { @@ -14174,7 +14161,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal /** * Reset resolved text direction. Will be resolved during a call to getResolvedTextDirection(). * - * @hide */ protected void resetResolvedTextDirection() { mResolvedTextDirection = TEXT_DIRECTION_INHERIT; diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 7534274..7efb731 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -3495,4 +3495,6 @@ =============================================================== --> <public type="attr" name="isolatedProcess" id="0x010103a7" /> + <public type="attr" name="textDirection"/> + </resources> |