diff options
author | 2013-06-05 01:36:24 -0700 | |
---|---|---|
committer | 2013-06-05 01:36:24 -0700 | |
commit | d8177b3abac3bbe4729ac4c27dd5cce4220628bf (patch) | |
tree | 37ef8c485ed4ef3adfe19f12d89b15413ea72dd2 /java | |
parent | 8235d940c498d8fa55466abf4382d3e145b29f87 (diff) | |
parent | 9c440d137300ddf72cca201cf08c9bb2e32d6836 (diff) | |
download | latinime-d8177b3abac3bbe4729ac4c27dd5cce4220628bf.tar.gz latinime-d8177b3abac3bbe4729ac4c27dd5cce4220628bf.tar.xz latinime-d8177b3abac3bbe4729ac4c27dd5cce4220628bf.zip |
am 9c440d13: Merge "Remove unnecessary Drawable.setState"
* commit '9c440d137300ddf72cca201cf08c9bb2e32d6836':
Remove unnecessary Drawable.setState
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/MainKeyboardView.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 2e8772635..7f335027f 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -808,10 +808,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack final KeyDrawParams drawParams = mKeyDrawParams; previewText.setTextColor(drawParams.mPreviewTextColor); final Drawable background = previewText.getBackground(); - if (background != null) { - background.setState(KEY_PREVIEW_BACKGROUND_DEFAULT_STATE); - background.setAlpha(PREVIEW_ALPHA); - } final String label = key.getPreviewLabel(); // What we show as preview should match what we show on a key top in onDraw(). if (label != null) { @@ -865,6 +861,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack if (background != null) { final int hasMoreKeys = (key.mMoreKeys != null) ? STATE_HAS_MOREKEYS : STATE_NORMAL; background.setState(KEY_PREVIEW_BACKGROUND_STATE_TABLE[statePosition][hasMoreKeys]); + background.setAlpha(PREVIEW_ALPHA); } ViewLayoutUtils.placeViewAt( previewText, previewX, previewY, previewWidth, previewHeight); |