summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/KeyboardView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-10-14 12:21:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-14 12:21:17 -0700
commitd2bc850c4c60dbb70e1a5edcf7f4dc4c64752fa2 (patch)
tree80b9f5effa11bfb22500ea29095eb2899d480277 /java/src/com/android/inputmethod/keyboard/KeyboardView.java
parent75c4b5fe1bbc7736d05abd7940825a30339c65fc (diff)
parent908a2f63949687c9e7acb2e3d50fd50815582e8b (diff)
am 908a2f63: Merge "Special handling of one key mini-keyboard to mitigate visual flicker" into ics-mr0
* commit '908a2f63949687c9e7acb2e3d50fd50815582e8b': Special handling of one key mini-keyboard to mitigate visual flicker
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index e69dc581b..04e672590 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -100,7 +100,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
// Key preview
private final int mKeyPreviewLayoutId;
- private final KeyPreviewDrawParams mKeyPreviewDrawParams;
+ protected final KeyPreviewDrawParams mKeyPreviewDrawParams;
private boolean mShowKeyPreviewPopup = true;
private final int mDelayBeforePreview;
private int mDelayAfterPreview;
@@ -284,11 +284,13 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
}
}
- private static class KeyPreviewDrawParams {
+ protected static class KeyPreviewDrawParams {
// XML attributes.
public final Drawable mPreviewBackground;
public final Drawable mPreviewLeftBackground;
public final Drawable mPreviewRightBackground;
+ public final int mPreviewBackgroundWidth;
+ public final int mPreviewBackgroundHeight;
public final int mPreviewTextColor;
public final int mPreviewOffset;
public final int mPreviewHeight;
@@ -312,6 +314,10 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
setAlpha(mPreviewBackground, PREVIEW_ALPHA);
setAlpha(mPreviewLeftBackground, PREVIEW_ALPHA);
setAlpha(mPreviewRightBackground, PREVIEW_ALPHA);
+ mPreviewBackgroundWidth = a.getDimensionPixelSize(
+ R.styleable.KeyboardView_keyPreviewBackgroundWidth, 0);
+ mPreviewBackgroundHeight = a.getDimensionPixelSize(
+ R.styleable.KeyboardView_keyPreviewBackgroundHeight, 0);
mPreviewOffset = a.getDimensionPixelOffset(
R.styleable.KeyboardView_keyPreviewOffset, 0);
mPreviewHeight = a.getDimensionPixelSize(