diff options
| author | 2010-07-30 16:34:06 -0700 | |
|---|---|---|
| committer | 2010-07-30 16:34:06 -0700 | |
| commit | c8f5e437194129e397cf323fa857f3485f58f4cc (patch) | |
| tree | 6d4b3146f0ef200c01367523e78c09a9ac4e0f55 | |
| parent | 86dde2d64c7eadc06a17aeb486c669ce4b53d13c (diff) | |
| parent | 0972d071cd1b5eba60a6c20551f4500b638a1bf1 (diff) | |
Merge "Fix KeyboardView's verticalCorrection handling"
| -rw-r--r-- | core/java/android/inputmethodservice/KeyboardView.java | 4 | ||||
| -rwxr-xr-x | core/res/res/xml/password_kbd_numeric.xml | 27 | ||||
| -rwxr-xr-x | core/res/res/xml/password_kbd_symbols.xml | 2 | ||||
| -rwxr-xr-x | core/res/res/xml/password_kbd_symbols_shift.xml | 2 |
4 files changed, 22 insertions, 13 deletions
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java index 4b484092d02e..ab5c78a92078 100644 --- a/core/java/android/inputmethodservice/KeyboardView.java +++ b/core/java/android/inputmethodservice/KeyboardView.java @@ -1128,7 +1128,9 @@ public class KeyboardView extends View implements View.OnClickListener { private boolean onModifiedTouchEvent(MotionEvent me, boolean possiblePoly) { int touchX = (int) me.getX() - mPaddingLeft; - int touchY = (int) me.getY() + mVerticalCorrection - mPaddingTop; + int touchY = (int) me.getY() - mPaddingTop; + if (touchY >= -mVerticalCorrection) + touchY += mVerticalCorrection; final int action = me.getAction(); final long eventTime = me.getEventTime(); mOldEventTime = eventTime; diff --git a/core/res/res/xml/password_kbd_numeric.xml b/core/res/res/xml/password_kbd_numeric.xml index e3f161234aa8..bdd8afb2349c 100755 --- a/core/res/res/xml/password_kbd_numeric.xml +++ b/core/res/res/xml/password_kbd_numeric.xml @@ -24,30 +24,37 @@ android:keyHeight="@dimen/password_keyboard_key_height" > - <Row> - <Key android:codes="49" android:keyIcon="@drawable/sym_keyboard_num1" android:keyEdgeFlags="left"/> + <Row android:rowEdgeFlags="top"> + <Key android:codes="49" android:keyIcon="@drawable/sym_keyboard_num1" + android:keyEdgeFlags="left"/> <Key android:codes="50" android:keyIcon="@drawable/sym_keyboard_num2"/> - <Key android:codes="51" android:keyIcon="@drawable/sym_keyboard_num3"/> + <Key android:codes="51" android:keyIcon="@drawable/sym_keyboard_num3" + android:keyEdgeFlags="right"/> </Row> <Row> - <Key android:codes="52" android:keyIcon="@drawable/sym_keyboard_num4" android:keyEdgeFlags="left"/> + <Key android:codes="52" android:keyIcon="@drawable/sym_keyboard_num4" + android:keyEdgeFlags="left"/> <Key android:codes="53" android:keyIcon="@drawable/sym_keyboard_num5"/> - <Key android:codes="54" android:keyIcon="@drawable/sym_keyboard_num6"/> + <Key android:codes="54" android:keyIcon="@drawable/sym_keyboard_num6" + android:keyEdgeFlags="right"/> </Row> <Row> - <Key android:codes="55" android:keyIcon="@drawable/sym_keyboard_num7" android:keyEdgeFlags="left"/> + <Key android:codes="55" android:keyIcon="@drawable/sym_keyboard_num7" + android:keyEdgeFlags="left"/> <Key android:codes="56" android:keyIcon="@drawable/sym_keyboard_num8"/> - <Key android:codes="57" android:keyIcon="@drawable/sym_keyboard_num9"/> + <Key android:codes="57" android:keyIcon="@drawable/sym_keyboard_num9" + android:keyEdgeFlags="right"/> </Row> <Row android:rowEdgeFlags="bottom"> - <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok"/> + <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok" + android:keyEdgeFlags="left"/> <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus"/> <Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:isRepeatable="true" android:keyEdgeFlags="right"/> + android:iconPreview="@drawable/sym_keyboard_feedback_delete" + android:isRepeatable="true" android:keyEdgeFlags="right"/> </Row> </Keyboard> diff --git a/core/res/res/xml/password_kbd_symbols.xml b/core/res/res/xml/password_kbd_symbols.xml index 14a7ec8766e7..990152697e8a 100755 --- a/core/res/res/xml/password_kbd_symbols.xml +++ b/core/res/res/xml/password_kbd_symbols.xml @@ -25,7 +25,7 @@ android:keyHeight="@dimen/password_keyboard_key_height" > - <Row> + <Row android:rowEdgeFlags="top"> <Key android:keyLabel="1" android:keyEdgeFlags="left"/> <Key android:keyLabel="2"/> <Key android:keyLabel="3"/> diff --git a/core/res/res/xml/password_kbd_symbols_shift.xml b/core/res/res/xml/password_kbd_symbols_shift.xml index 4b84f4bc4132..5b73914987eb 100755 --- a/core/res/res/xml/password_kbd_symbols_shift.xml +++ b/core/res/res/xml/password_kbd_symbols_shift.xml @@ -25,7 +25,7 @@ android:keyHeight="@dimen/password_keyboard_key_height" > - <Row> + <Row android:rowEdgeFlags="top"> <Key android:keyLabel="~" android:keyEdgeFlags="left"/> <Key android:keyLabel="`"/> <Key android:keyLabel="|"/> |