Merge "Fix KeyboardView's verticalCorrection handling"
This commit is contained in:
committed by
Android (Google) Code Review
commit
c8f5e43719
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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="|"/>
|
||||
|
||||
Reference in New Issue
Block a user