summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-04-03 17:09:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-03 17:09:26 +0000
commit537be409f281d4a872cbcebb6ac3a4d767ded4da (patch)
treeb0d4be123552dae94eb552eb00a6090c1b9479c1 /core
parentc6f6ba3265d2b07649277682fd3ca0f9ce4d011a (diff)
parentc333381b4c1b46f13f75388099cafb740844c497 (diff)
downloadframeworks_base-537be409f281d4a872cbcebb6ac3a4d767ded4da.zip
frameworks_base-537be409f281d4a872cbcebb6ac3a4d767ded4da.tar.gz
frameworks_base-537be409f281d4a872cbcebb6ac3a4d767ded4da.tar.bz2
am c333381b: am 24a2f20f: am c420ce34: Merge "Marquee text RTL improvements"
* commit 'c333381b4c1b46f13f75388099cafb740844c497': Marquee text RTL improvements
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/TextView.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 687036c..5e4c143 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -5163,12 +5163,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int width = mRight - mLeft;
final int padding = getCompoundPaddingLeft() + getCompoundPaddingRight();
final float dx = mLayout.getLineRight(0) - (width - padding);
- canvas.translate(isLayoutRtl ? -dx : +dx, 0.0f);
+ canvas.translate(layout.getParagraphDirection(0) * dx, 0.0f);
}
if (mMarquee != null && mMarquee.isRunning()) {
final float dx = -mMarquee.getScroll();
- canvas.translate(isLayoutRtl ? -dx : +dx, 0.0f);
+ canvas.translate(layout.getParagraphDirection(0) * dx, 0.0f);
}
}
@@ -5182,8 +5182,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (mMarquee != null && mMarquee.shouldDrawGhost()) {
- final int dx = (int) mMarquee.getGhostOffset();
- canvas.translate(isLayoutRtl ? -dx : dx, 0.0f);
+ final float dx = mMarquee.getGhostOffset();
+ canvas.translate(layout.getParagraphDirection(0) * dx, 0.0f);
layout.draw(canvas, highlight, mHighlightPaint, cursorOffsetVertical);
}