summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/Key.java
diff options
context:
space:
mode:
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) {