summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextView.java
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2012-09-23 14:51:16 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2012-09-23 14:51:16 -0700
commite56ffdc7b31b0937628609cc3bbaa15879023569 (patch)
tree3931f55333ff16681975cada6745a4adfc8b182d /core/java/android/widget/TextView.java
parent4457e85a7090ad51726d50a4daf981d917cceedd (diff)
Fix bug #6427629 Clean up layout direction APIs
- rename getResolvedLayoutDirection() to getLayoutDirection() Change-Id: I3afe56c0db0751952f5056c23893cb7455531d29
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r--core/java/android/widget/TextView.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f7a1af01f8c7..d8d9b45e09d6 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -1546,7 +1546,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*/
public int getCompoundPaddingStart() {
resolveDrawables();
- switch(getResolvedLayoutDirection()) {
+ switch(getLayoutDirection()) {
default:
case LAYOUT_DIRECTION_LTR:
return getCompoundPaddingLeft();
@@ -1561,7 +1561,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*/
public int getCompoundPaddingEnd() {
resolveDrawables();
- switch(getResolvedLayoutDirection()) {
+ switch(getLayoutDirection()) {
default:
case LAYOUT_DIRECTION_LTR:
return getCompoundPaddingRight();
@@ -4858,7 +4858,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final boolean isLayoutRtl = isLayoutRtl();
- final int layoutDirection = getResolvedLayoutDirection();
+ final int layoutDirection = getLayoutDirection();
final int absoluteGravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
if (mEllipsize == TextUtils.TruncateAt.MARQUEE &&
mMarqueeFadeMode != MARQUEE_FADE_SWITCH_SHOW_ELLIPSIS) {
@@ -5680,11 +5680,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mLayoutAlignment = Layout.Alignment.ALIGN_CENTER;
break;
case TEXT_ALIGNMENT_VIEW_START:
- mLayoutAlignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
+ mLayoutAlignment = (getLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
Layout.Alignment.ALIGN_RIGHT : Layout.Alignment.ALIGN_LEFT;
break;
case TEXT_ALIGNMENT_VIEW_END:
- mLayoutAlignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
+ mLayoutAlignment = (getLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
Layout.Alignment.ALIGN_LEFT : Layout.Alignment.ALIGN_RIGHT;
break;
case TEXT_ALIGNMENT_INHERIT:
@@ -7485,7 +7485,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return 0.0f;
}
} else if (getLineCount() == 1) {
- final int layoutDirection = getResolvedLayoutDirection();
+ final int layoutDirection = getLayoutDirection();
final int absoluteGravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
case Gravity.LEFT:
@@ -7512,7 +7512,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final float scroll = marquee.getScroll();
return (maxFadeScroll - scroll) / getHorizontalFadingEdgeLength();
} else if (getLineCount() == 1) {
- final int layoutDirection = getResolvedLayoutDirection();
+ final int layoutDirection = getLayoutDirection();
final int absoluteGravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
switch (absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
case Gravity.LEFT:
@@ -8189,7 +8189,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
// Always need to resolve layout direction first
- final boolean defaultIsRtl = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL);
+ final boolean defaultIsRtl = (getLayoutDirection() == LAYOUT_DIRECTION_RTL);
// Now, we can select the heuristic
int textDir = getResolvedTextDirection();