diff options
author | Jae Yong Sung <jysung@google.com> | 2010-08-05 10:44:27 -0700 |
---|---|---|
committer | Jae Yong Sung <jysung@google.com> | 2010-08-13 15:08:05 -0700 |
commit | 8171b5182f5f07d33c9dfdf2dd8f0f6ae9588039 (patch) | |
tree | 8c6c4b9de2a045809ce420a89edd76e6bf837f25 /core/java/android/inputmethodservice/Keyboard.java | |
parent | aece2d0ca012144007870db9bb2cf0e360cbb973 (diff) | |
download | frameworks_base-8171b5182f5f07d33c9dfdf2dd8f0f6ae9588039.zip frameworks_base-8171b5182f5f07d33c9dfdf2dd8f0f6ae9588039.tar.gz frameworks_base-8171b5182f5f07d33c9dfdf2dd8f0f6ae9588039.tar.bz2 |
lock screen for xlarge
Change-Id: Iab9f53609bf24be774752a9960aaaa654d7a614f
Diffstat (limited to 'core/java/android/inputmethodservice/Keyboard.java')
-rwxr-xr-x | core/java/android/inputmethodservice/Keyboard.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/Keyboard.java b/core/java/android/inputmethodservice/Keyboard.java index 4814b0a..885a6b8 100755 --- a/core/java/android/inputmethodservice/Keyboard.java +++ b/core/java/android/inputmethodservice/Keyboard.java @@ -500,7 +500,30 @@ public class Keyboard { public Keyboard(Context context, int xmlLayoutResId) { this(context, xmlLayoutResId, 0); } - + + /** + * Creates a keyboard from the given xml key layout file. Weeds out rows + * that have a keyboard mode defined but don't match the specified mode. + * @param context the application or service context + * @param xmlLayoutResId the resource file that contains the keyboard layout and keys. + * @param modeId keyboard mode identifier + * @param width sets width of keyboard + * @param height sets height of keyboard + */ + public Keyboard(Context context, int xmlLayoutResId, int modeId, int width, int height) { + mDisplayWidth = width; + mDisplayHeight = height; + + mDefaultHorizontalGap = 0; + mDefaultWidth = mDisplayWidth / 10; + mDefaultVerticalGap = 0; + mDefaultHeight = mDefaultWidth; + mKeys = new ArrayList<Key>(); + mModifierKeys = new ArrayList<Key>(); + mKeyboardMode = modeId; + loadKeyboard(context, context.getResources().getXml(xmlLayoutResId)); + } + /** * Creates a keyboard from the given xml key layout file. Weeds out rows * that have a keyboard mode defined but don't match the specified mode. |