aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-05-19 14:06:48 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-05-19 14:07:35 +0900
commit6ea0dab845e9b767d8d7d09c3690ad0f7076b24d (patch)
treeb53c2f7e76eaff890ccb1c2128e699088df2f321 /java/src
parent10bd458efc2cc04d30df279e68e43c242a6cc60a (diff)
downloadlatinime-6ea0dab845e9b767d8d7d09c3690ad0f7076b24d.tar.gz
latinime-6ea0dab845e9b767d8d7d09c3690ad0f7076b24d.tar.xz
latinime-6ea0dab845e9b767d8d7d09c3690ad0f7076b24d.zip
Remove Emoji delete key UX hack
The Emoji delete key UX hack that changes key background color based on the key state isn't keyboard theme compliant. Change-Id: I0fa43a91cdd6da944d6d4d1a5a09b771f852a081
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
index 3813c578a..8e4595703 100644
--- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
@@ -416,14 +416,11 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
private static class DeleteKeyOnTouchListener implements OnTouchListener {
static final long MAX_REPEAT_COUNT_TIME = TimeUnit.SECONDS.toMillis(30);
- final int mDeleteKeyPressedBackgroundColor;
final long mKeyRepeatStartTimeout;
final long mKeyRepeatInterval;
public DeleteKeyOnTouchListener(Context context) {
final Resources res = context.getResources();
- mDeleteKeyPressedBackgroundColor =
- res.getColor(R.color.emoji_key_pressed_background_color);
mKeyRepeatStartTimeout = res.getInteger(R.integer.config_key_repeat_start_timeout);
mKeyRepeatInterval = res.getInteger(R.integer.config_key_repeat_interval);
mTimer = new CountDownTimer(MAX_REPEAT_COUNT_TIME, mKeyRepeatInterval) {
@@ -500,7 +497,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
mTimer.cancel();
mRepeatCount = 0;
handleKeyDown();
- v.setBackgroundColor(mDeleteKeyPressedBackgroundColor);
+ v.setPressed(true /* pressed */);
mState = KEY_REPEAT_STATE_KEY_DOWN;
mTimer.start();
}
@@ -510,7 +507,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
if (mState == KEY_REPEAT_STATE_KEY_DOWN) {
handleKeyUp();
}
- v.setBackgroundColor(Color.TRANSPARENT);
+ v.setPressed(false /* pressed */);
mState = KEY_REPEAT_STATE_INITIALIZED;
}