summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/Key.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-05-16 17:41:56 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-05-16 17:41:56 +0900
commit1f2d0aa6c9b343848ee51e5bc13ccaaadf3ba4fe (patch)
tree6e110231e50cf9fea278161293caad37621dbb2d /java/src/com/android/inputmethod/keyboard/Key.java
parentf91739b41e3a9dc85a185b88670b7ee9204a712f (diff)
Set divider icon's alpha value on the fly
Bug: 6183494 Change-Id: I61a0c7617648d9c52e5001b3479afa0ab4913adc
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/Key.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 4d7fe3d8e..c3f5e7da2 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -571,9 +571,13 @@ public class Key {
return (mMoreKeysColumnAndFlags & MORE_KEYS_FLAGS_EMBEDDED_MORE_KEY) != 0;
}
- public Drawable getIcon(KeyboardIconsSet iconSet) {
+ public Drawable getIcon(KeyboardIconsSet iconSet, int alpha) {
final int iconId = mEnabled ? mIconId : mDisabledIconId;
- return iconSet.getIconDrawable(iconId);
+ final Drawable icon = iconSet.getIconDrawable(iconId);
+ if (icon != null) {
+ icon.setAlpha(alpha);
+ }
+ return icon;
}
public Drawable getPreviewIcon(KeyboardIconsSet iconSet) {