summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/KeyboardView.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index b259e0c03..e7dd716fb 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -692,7 +692,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// Draw key label
if (label != null) {
// For characters, use large font. For labels like "Done", use small font.
- final int labelSize = getLabelSizeAndSetPaint(label, key, paint);
+ final int labelSize = getLabelSizeAndSetPaint(label, key.mLabelOption, paint);
final int labelCharHeight = getLabelCharHeight(labelSize, paint);
// Vertical label text alignment.
@@ -828,13 +828,13 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
mDirtyRect.setEmpty();
}
- private int getLabelSizeAndSetPaint(CharSequence label, Key key, Paint paint) {
+ public int getLabelSizeAndSetPaint(CharSequence label, int keyLabelOption, Paint paint) {
// For characters, use large font. For labels like "Done", use small font.
final int labelSize;
final Typeface labelStyle;
if (label.length() > 1) {
labelSize = mLabelTextSize;
- if ((key.mLabelOption & KEY_LABEL_OPTION_FONT_NORMAL) != 0) {
+ if ((keyLabelOption & KEY_LABEL_OPTION_FONT_NORMAL) != 0) {
labelStyle = Typeface.DEFAULT;
} else {
labelStyle = Typeface.DEFAULT_BOLD;
@@ -1126,7 +1126,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// Remove gesture detector on mini-keyboard
miniKeyboard.mGestureDetector = null;
- Keyboard keyboard = new MiniKeyboardBuilder(getContext(), popupKeyboardResId, popupKey)
+ Keyboard keyboard = new MiniKeyboardBuilder(this, popupKeyboardResId, popupKey)
.build();
miniKeyboard.setKeyboard(keyboard);
miniKeyboard.setPopupParent(this);