diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2010-07-30 15:18:56 -0700 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2010-07-30 16:08:47 -0700 |
| commit | 0972d071cd1b5eba60a6c20551f4500b638a1bf1 (patch) | |
| tree | 473585972f1af6c6fb61f85af952aeac0a7cd646 /core/java | |
| parent | 42272759e4c3c406977187fd2b4df8739edccde8 (diff) | |
| download | frameworks_base-0972d071cd1b5eba60a6c20551f4500b638a1bf1.zip frameworks_base-0972d071cd1b5eba60a6c20551f4500b638a1bf1.tar.gz frameworks_base-0972d071cd1b5eba60a6c20551f4500b638a1bf1.tar.bz2 | |
Fix KeyboardView's verticalCorrection handling
Do not correct the touch point if it is within the range of
verticalCorrection from the top of KeyboardView, so that the touch
point will not have negative y-axis value.
Bug: 2659128
Change-Id: I91a3e65fc5dee1383dbbfb45690e307fc0adc1d1
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/inputmethodservice/KeyboardView.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java index 4b48409..ab5c78a 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; |
