diff --git a/java/res/drawable-hdpi/hint_popup.9.png b/java/res/drawable-hdpi/hint_popup.9.png
deleted file mode 100644
index 5b2ad5388..000000000
Binary files a/java/res/drawable-hdpi/hint_popup.9.png and /dev/null differ
diff --git a/java/res/drawable-hdpi/hint_popup_holo.9.png b/java/res/drawable-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index c44af8883..000000000
Binary files a/java/res/drawable-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-land-hdpi/hint_popup_holo.9.png b/java/res/drawable-land-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index 2b93014e1..000000000
Binary files a/java/res/drawable-land-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-land-mdpi/hint_popup_holo.9.png b/java/res/drawable-land-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index c409cea00..000000000
Binary files a/java/res/drawable-land-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-land-xhdpi/hint_popup_holo.9.png b/java/res/drawable-land-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index 3cd20d34f..000000000
Binary files a/java/res/drawable-land-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-mdpi/hint_popup.9.png b/java/res/drawable-mdpi/hint_popup.9.png
deleted file mode 100644
index 444cc26ee..000000000
Binary files a/java/res/drawable-mdpi/hint_popup.9.png and /dev/null differ
diff --git a/java/res/drawable-mdpi/hint_popup_holo.9.png b/java/res/drawable-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index e9e131c54..000000000
Binary files a/java/res/drawable-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-hdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index 2ffc6ea2b..000000000
Binary files a/java/res/drawable-sw600dp-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-land-hdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-land-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index 2ffc6ea2b..000000000
Binary files a/java/res/drawable-sw600dp-land-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-land-mdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-land-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index f5d15b728..000000000
Binary files a/java/res/drawable-sw600dp-land-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-land-xhdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-land-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index bc37fa844..000000000
Binary files a/java/res/drawable-sw600dp-land-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-mdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index f5d15b728..000000000
Binary files a/java/res/drawable-sw600dp-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw600dp-xhdpi/hint_popup_holo.9.png b/java/res/drawable-sw600dp-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index bc37fa844..000000000
Binary files a/java/res/drawable-sw600dp-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-hdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index 2ffc6ea2b..000000000
Binary files a/java/res/drawable-sw768dp-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-land-hdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-land-hdpi/hint_popup_holo.9.png
deleted file mode 100644
index 2b93014e1..000000000
Binary files a/java/res/drawable-sw768dp-land-hdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-land-mdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-land-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index c409cea00..000000000
Binary files a/java/res/drawable-sw768dp-land-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-land-xhdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-land-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index 3cd20d34f..000000000
Binary files a/java/res/drawable-sw768dp-land-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-mdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-mdpi/hint_popup_holo.9.png
deleted file mode 100644
index 01d1139d8..000000000
Binary files a/java/res/drawable-sw768dp-mdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-sw768dp-xhdpi/hint_popup_holo.9.png b/java/res/drawable-sw768dp-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index bc37fa844..000000000
Binary files a/java/res/drawable-sw768dp-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/drawable-xhdpi/hint_popup.9.png b/java/res/drawable-xhdpi/hint_popup.9.png
deleted file mode 100644
index add474337..000000000
Binary files a/java/res/drawable-xhdpi/hint_popup.9.png and /dev/null differ
diff --git a/java/res/drawable-xhdpi/hint_popup_holo.9.png b/java/res/drawable-xhdpi/hint_popup_holo.9.png
deleted file mode 100644
index a2b114e14..000000000
Binary files a/java/res/drawable-xhdpi/hint_popup_holo.9.png and /dev/null differ
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 351be28f2..6b063efff 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -64,9 +64,6 @@
-
-
-
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index 07a7f3c86..1f1488e26 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -49,7 +49,6 @@
- #E0E0E4E5
- #66E0E4E5
- #CCE0E4E5
- - @drawable/hint_popup
- @layout/key_preview
- @drawable/keyboard_key_feedback
- @drawable/keyboard_key_feedback
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 840e52894..157c2b4e0 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -100,7 +100,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// Miscellaneous constants
private static final int[] LONG_PRESSABLE_STATE_SET = { android.R.attr.state_long_pressable };
- private static final int HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL = -1;
// XML attribute
private final int mKeyTextColor;
@@ -125,12 +124,14 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
private final int mPreviewOffset;
private final int mPreviewHeight;
private final int mPopupLayout;
- private final Drawable mKeyPopupHintIcon;
private final int mKeyHintLetterColor;
private final int mKeyHintLabelColor;
private final int mKeyUppercaseLetterInactivatedColor;
private final int mKeyUppercaseLetterActivatedColor;
+ // HORIZONTAL ELLIPSIS "...", character for popup hint.
+ private static final String POPUP_HINT_CHAR = "\u2026";
+
// Main keyboard
private Keyboard mKeyboard;
private int mKeyLetterSize;
@@ -369,7 +370,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
mKeyTextColor = a.getColor(R.styleable.KeyboardView_keyTextColor, 0xFF000000);
mKeyTextInactivatedColor = a.getColor(
R.styleable.KeyboardView_keyTextInactivatedColor, 0xFF000000);
- mKeyPopupHintIcon = a.getDrawable(R.styleable.KeyboardView_keyPopupHintIcon);
mKeyHintLetterColor = a.getColor(R.styleable.KeyboardView_keyHintLetterColor, 0);
mKeyHintLabelColor = a.getColor(R.styleable.KeyboardView_keyHintLabelColor, 0);
mKeyUppercaseLetterInactivatedColor = a.getColor(
@@ -838,19 +838,15 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
}
}
- // Draw popup hint icon "...".
- // TODO: Draw "..." by text.
+ // Draw popup hint "..." at the bottom right corner of the key.
if (key.hasPopupHint()) {
- final int drawableWidth = keyDrawWidth;
- final int drawableHeight = key.mHeight;
- final int drawableX = 0;
- final int drawableY = HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL;
- final Drawable hintIcon = mKeyPopupHintIcon;
- drawIcon(canvas, hintIcon, drawableX, drawableY, drawableWidth, drawableHeight);
- if (DEBUG_SHOW_ALIGN) {
- drawRectangle(canvas, drawableX, drawableY, drawableWidth, drawableHeight,
- 0x80c0c000, new Paint());
- }
+ paint.setTextSize(mKeyHintLetterSize);
+ paint.setColor(mKeyHintLabelColor);
+ final int hintX = keyDrawWidth - getLabelCharWidth(paint);
+ // Using y-coordinate "key.mHeight - paint.descent()" draws "..." just on the bottom
+ // edge of the key. So we use slightly higher position by multiply descent length by 2.
+ final int hintY = key.mHeight - (int)paint.descent() * 2;
+ canvas.drawText(POPUP_HINT_CHAR, hintX, hintY, paint);
}
canvas.translate(-keyDrawX - kbdPaddingLeft, -key.mY - kbdPaddingTop);