Merge "Fix for bug 8911390 RTL text alignment is changed ..." into jb-mr2-dev

This commit is contained in:
Raph Levien
2013-05-15 17:44:16 +00:00
committed by Android (Google) Code Review

View File

@@ -64,7 +64,9 @@ public class Touch {
if (actualWidth < availableWidth) {
if (a == Alignment.ALIGN_CENTER) {
x = left - ((availableWidth - actualWidth) / 2);
} else if ((ltr && (a == Alignment.ALIGN_OPPOSITE)) || (a == Alignment.ALIGN_RIGHT)) {
} else if ((ltr && (a == Alignment.ALIGN_OPPOSITE)) ||
(!ltr && (a == Alignment.ALIGN_NORMAL)) ||
(a == Alignment.ALIGN_RIGHT)) {
// align_opposite does NOT mean align_right, we need the paragraph
// direction to resolve it to left or right
x = left - (availableWidth - actualWidth);