summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2015-05-20 17:09:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-20 17:09:13 +0000
commit3244a6633680cf98fa7a55534e3ebf2dea7389ee (patch)
treeb669a252de950dd42e05b12dcf11bf628544ea1c /core
parent5aa384cdc8f2228ccdecf09d7f15d7f92cd23500 (diff)
parent709386f501c5a496c8bbfa0336af03f3e09e5484 (diff)
downloadframeworks_base-3244a6633680cf98fa7a55534e3ebf2dea7389ee.zip
frameworks_base-3244a6633680cf98fa7a55534e3ebf2dea7389ee.tar.gz
frameworks_base-3244a6633680cf98fa7a55534e3ebf2dea7389ee.tar.bz2
Merge "Fix selection handles on older API versions" into mnc-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/Editor.java12
-rw-r--r--core/res/res/drawable-hdpi/text_select_handle_left_mtrl_alpha.pngbin368 -> 14872 bytes
-rw-r--r--core/res/res/drawable-hdpi/text_select_handle_right_mtrl_alpha.pngbin349 -> 14852 bytes
-rw-r--r--core/res/res/drawable-mdpi/text_select_handle_left_mtrl_alpha.pngbin267 -> 14716 bytes
-rw-r--r--core/res/res/drawable-mdpi/text_select_handle_right_mtrl_alpha.pngbin241 -> 14690 bytes
-rw-r--r--core/res/res/drawable-xhdpi/text_select_handle_left_mtrl_alpha.pngbin467 -> 14969 bytes
-rw-r--r--core/res/res/drawable-xhdpi/text_select_handle_right_mtrl_alpha.pngbin466 -> 14960 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/text_select_handle_left_mtrl_alpha.pngbin684 -> 15209 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/text_select_handle_right_mtrl_alpha.pngbin630 -> 15200 bytes
-rw-r--r--core/res/res/drawable-xxxhdpi/text_select_handle_left_mtrl_alpha.pngbin889 -> 15429 bytes
-rw-r--r--core/res/res/drawable-xxxhdpi/text_select_handle_right_mtrl_alpha.pngbin858 -> 15425 bytes
11 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index f5a99d1..34620e6 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -3966,7 +3966,11 @@ public class Editor {
@Override
protected int getHotspotX(Drawable drawable, boolean isRtlRun) {
- return isRtlRun ? 0 : drawable.getIntrinsicWidth();
+ if (isRtlRun) {
+ return drawable.getIntrinsicWidth() / 4;
+ } else {
+ return (drawable.getIntrinsicWidth() * 3) / 4;
+ }
}
@Override
@@ -4084,7 +4088,11 @@ public class Editor {
@Override
protected int getHotspotX(Drawable drawable, boolean isRtlRun) {
- return isRtlRun ? drawable.getIntrinsicWidth() : 0;
+ if (isRtlRun) {
+ return (drawable.getIntrinsicWidth() * 3) / 4;
+ } else {
+ return drawable.getIntrinsicWidth() / 4;
+ }
}
@Override
diff --git a/core/res/res/drawable-hdpi/text_select_handle_left_mtrl_alpha.png b/core/res/res/drawable-hdpi/text_select_handle_left_mtrl_alpha.png
index 1550b44..7ccb70a 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_left_mtrl_alpha.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_left_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_select_handle_right_mtrl_alpha.png b/core/res/res/drawable-hdpi/text_select_handle_right_mtrl_alpha.png
index b309dfd..e65b89d 100644
--- a/core/res/res/drawable-hdpi/text_select_handle_right_mtrl_alpha.png
+++ b/core/res/res/drawable-hdpi/text_select_handle_right_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_left_mtrl_alpha.png b/core/res/res/drawable-mdpi/text_select_handle_left_mtrl_alpha.png
index b36a413..775f1bb 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_left_mtrl_alpha.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_left_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_right_mtrl_alpha.png b/core/res/res/drawable-mdpi/text_select_handle_right_mtrl_alpha.png
index afd0bd2..68fd053 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_right_mtrl_alpha.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_right_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_select_handle_left_mtrl_alpha.png b/core/res/res/drawable-xhdpi/text_select_handle_left_mtrl_alpha.png
index 58f8c43..b5c2a91 100644
--- a/core/res/res/drawable-xhdpi/text_select_handle_left_mtrl_alpha.png
+++ b/core/res/res/drawable-xhdpi/text_select_handle_left_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/text_select_handle_right_mtrl_alpha.png b/core/res/res/drawable-xhdpi/text_select_handle_right_mtrl_alpha.png
index 42a893d..6c6185c 100644
--- a/core/res/res/drawable-xhdpi/text_select_handle_right_mtrl_alpha.png
+++ b/core/res/res/drawable-xhdpi/text_select_handle_right_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/text_select_handle_left_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/text_select_handle_left_mtrl_alpha.png
index d0f274a..f0e32af 100644
--- a/core/res/res/drawable-xxhdpi/text_select_handle_left_mtrl_alpha.png
+++ b/core/res/res/drawable-xxhdpi/text_select_handle_left_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/text_select_handle_right_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/text_select_handle_right_mtrl_alpha.png
index f1f637a..260e090 100644
--- a/core/res/res/drawable-xxhdpi/text_select_handle_right_mtrl_alpha.png
+++ b/core/res/res/drawable-xxhdpi/text_select_handle_right_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/text_select_handle_left_mtrl_alpha.png b/core/res/res/drawable-xxxhdpi/text_select_handle_left_mtrl_alpha.png
index 643168f..a7a48b8 100644
--- a/core/res/res/drawable-xxxhdpi/text_select_handle_left_mtrl_alpha.png
+++ b/core/res/res/drawable-xxxhdpi/text_select_handle_left_mtrl_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/text_select_handle_right_mtrl_alpha.png b/core/res/res/drawable-xxxhdpi/text_select_handle_right_mtrl_alpha.png
index e8f3aad..2c72f4f 100644
--- a/core/res/res/drawable-xxxhdpi/text_select_handle_right_mtrl_alpha.png
+++ b/core/res/res/drawable-xxxhdpi/text_select_handle_right_mtrl_alpha.png
Binary files differ