diff options
| author | 2011-08-22 16:24:43 -0700 | |
|---|---|---|
| committer | 2011-08-22 16:24:43 -0700 | |
| commit | c2d256b41587ff44efb6373885affe02e5df80b5 (patch) | |
| tree | 29310474e8da671710fc4da0a5f044e41c18e44e | |
| parent | 04963769e36a389f96a25712dd0bd0de570b4df8 (diff) | |
| parent | a646145c335ba821f01d9e4f8be2583eb9fd7266 (diff) | |
Merge "Improve TextDirection resolution"
| -rw-r--r-- | core/java/android/text/TextDirectionHeuristics.java | 24 | ||||
| -rw-r--r-- | core/java/android/view/View.java | 3 | ||||
| -rw-r--r-- | core/java/android/widget/TextView.java | 3 |
3 files changed, 3 insertions, 27 deletions
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java index 5ed2df4724e8..6debc6b3ecf1 100644 --- a/core/java/android/text/TextDirectionHeuristics.java +++ b/core/java/android/text/TextDirectionHeuristics.java @@ -50,22 +50,6 @@ public class TextDirectionHeuristics { new TextDirectionHeuristicInternal(FirstStrong.INSTANCE, true); /** - * If the text contains any strong left to right non-format character, determines - * that the direction is left to right, falling back to left to right if it - * finds none. - */ - public static final TextDirectionHeuristic ANYLTR_LTR = - new TextDirectionHeuristicInternal(AnyStrong.INSTANCE_LTR, false); - - /** - * If the text contains any strong left to right non-format character, determines - * that the direction is left to right, falling back to right to left if it - * finds none. - */ - public static final TextDirectionHeuristic ANYLTR_RTL = - new TextDirectionHeuristicInternal(AnyStrong.INSTANCE_LTR, true); - - /** * 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. @@ -74,14 +58,6 @@ public class TextDirectionHeuristics { new TextDirectionHeuristicInternal(AnyStrong.INSTANCE_RTL, false); /** - * If the text contains any strong right to left non-format character, determines - * that the direction is right to left, falling back to right to left if it - * finds none. - */ - public static final TextDirectionHeuristic ANYRTL_RTL = - new TextDirectionHeuristicInternal(AnyStrong.INSTANCE_RTL, true); - - /** * Examines only the strong directional non-format characters, and if either * left to right or right to left characters are 60% or more of this total, * determines that the direction follows the majority of characters. Falls diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 8006185014ca..17e637c57cc5 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -9185,7 +9185,8 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit mPrivateFlags &= ~AWAKEN_SCROLL_BARS_ON_ATTACH; } jumpDrawablesToCurrentState(); - // Order is important here: LayoutDirection should be resolved before Padding and TextDirection + // Order is important here: LayoutDirection MUST be resolved before Padding + // and TextDirection resolveLayoutDirectionIfNeeded(); resolvePadding(); resolveTextDirection(); diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 7a5a091a848b..662b964fc3c7 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -10745,8 +10745,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener TextDirectionHeuristics.FIRSTSTRONG_LTR); break; case TEXT_DIRECTION_ANY_RTL: - mTextDir = (defaultIsRtl ? TextDirectionHeuristics.ANYRTL_RTL: - TextDirectionHeuristics.ANYRTL_LTR); + mTextDir = TextDirectionHeuristics.ANYRTL_LTR; break; case TEXT_DIRECTION_CHAR_COUNT: mTextDir = (defaultIsRtl ? TextDirectionHeuristics.CHARCOUNT_RTL: |