diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2011-06-21 20:10:51 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2011-06-23 21:06:17 +0900 |
| commit | 9116bf18f9c83084f9d451e2e709eff32db27d36 (patch) | |
| tree | 0edc19d24475006efb48b119df7bc22e64202d28 /java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java | |
| parent | 44f8dc3132ebfd5886749a888b6388963293d298 (diff) | |
New IceCreamSandwich assets and theme
This change instroduces new IceCreamSandwich assets and renames
Honeycomb theme to IceCreamSandwich. Though checked only on
hdpi-phone and mdpi-10"-tablet.
File another bug (Bug: 4852048) to fine tune keyboard layout for all
possible combination of devices and themes.
Bug: 4436327
Change-Id: I4f8dc1dd6b798a39204702bbcbebf17a199dc82f
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java index 78546f879..d5b364818 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java @@ -126,6 +126,8 @@ public class KeyboardParser { private final Context mContext; private final Resources mResources; + private int mKeyboardTopPadding; + private int mKeyboardBottomPadding; private int mHorizontalEdgesPadding; private int mCurrentX = 0; private int mCurrentY = 0; @@ -234,6 +236,10 @@ public class KeyboardParser { R.styleable.Keyboard_Key_maxPopupKeyboardColumn, 5)); mKeyboard.mIconsSet.loadIcons(keyboardAttr); + mKeyboardTopPadding = keyboardAttr.getDimensionPixelSize( + R.styleable.Keyboard_keyboardTopPadding, 0); + mKeyboardBottomPadding = keyboardAttr.getDimensionPixelSize( + R.styleable.Keyboard_keyboardBottomPadding, 0); } finally { keyAttr.recycle(); keyboardAttr.recycle(); @@ -602,7 +608,7 @@ public class KeyboardParser { } private void startKeyboard() { - mCurrentY += (int)mResources.getDimension(R.dimen.keyboard_top_padding); + mCurrentY += mKeyboardTopPadding; } private void startRow(Row row) { @@ -626,7 +632,7 @@ public class KeyboardParser { } private void endKeyboard(int defaultVerticalGap) { - mCurrentY += (int)mResources.getDimension(R.dimen.keyboard_bottom_padding); + mCurrentY += mKeyboardBottomPadding; mTotalHeight = mCurrentY - defaultVerticalGap; } |
