summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-08-31 13:56:37 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2011-08-31 13:56:37 -0700
commit3716601573f5a562f98721130e25002ad88eb164 (patch)
tree007af2605606250137105004c273235c7f895143 /core
parent3efc794f8563558b9792cc8ffa1ab9e81a0129ea (diff)
downloadframeworks_base-3716601573f5a562f98721130e25002ad88eb164.zip
frameworks_base-3716601573f5a562f98721130e25002ad88eb164.tar.gz
frameworks_base-3716601573f5a562f98721130e25002ad88eb164.tar.bz2
Fix bug #5243493 TextView selection is not working correctly when there is some RTL run into it
- make the selection green highlight work Change-Id: I4e3b88e3720288f973b1b9e68afa8f800ad13779
Diffstat (limited to 'core')
-rw-r--r--core/java/android/text/Layout.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 421e995..768071f 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -1296,7 +1296,10 @@ public abstract class Layout {
float h1 = getHorizontal(st, false, line);
float h2 = getHorizontal(en, true, line);
- dest.addRect(h1, top, h2, bottom, Path.Direction.CW);
+ float left = Math.min(h1, h2);
+ float right = Math.max(h1, h2);
+
+ dest.addRect(left, top, right, bottom, Path.Direction.CW);
}
}
}