diff options
author | 2010-04-16 15:55:35 +0900 | |
---|---|---|
committer | 2010-04-16 15:55:35 +0900 | |
commit | 19266dc860a9ff780be4d0ec1b68e23e93980c55 (patch) | |
tree | cf65357c53e2bf22dce5a981a57b091db0962549 /java/src | |
parent | 1cf0ce74e857e3f03a3f7173f0d588b2ed02ce2d (diff) | |
parent | 857cde9007072caf916c77edacc6543738374d54 (diff) | |
download | latinime-19266dc860a9ff780be4d0ec1b68e23e93980c55.tar.gz latinime-19266dc860a9ff780be4d0ec1b68e23e93980c55.tar.xz latinime-19266dc860a9ff780be4d0ec1b68e23e93980c55.zip |
Merge commit 'goog/master'
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/voice/RecognitionView.java | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index 6ba2095c0..74fc475e6 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -192,12 +192,12 @@ public class LatinKeyboardView extends KeyboardView { mLastY = (int) me.getY(); invalidate(); } + // If an extension keyboard is visible or this is an extension keyboard, don't look // for sudden jumps. Otherwise, if there was a sudden jump, return without processing the // actual motion event. if (!mExtensionVisible && !mIsExtensionType && handleSuddenJump(me)) return true; - // Reset any bounding box controls in the keyboard if (me.getAction() == MotionEvent.ACTION_DOWN) { keyboard.keyReleased(); @@ -219,7 +219,9 @@ public class LatinKeyboardView extends KeyboardView { if (keyboard.getExtension() == 0) { return super.onTouchEvent(me); } - if (me.getY() < 0) { + // If the motion event is above the keyboard and it's not an UP event coming + // even before the first MOVE event into the extension area + if (me.getY() < 0 && (mExtensionVisible || me.getAction() != MotionEvent.ACTION_UP)) { if (mExtensionVisible) { int action = me.getAction(); if (mFirstEvent) action = MotionEvent.ACTION_DOWN; diff --git a/java/src/com/android/inputmethod/voice/RecognitionView.java b/java/src/com/android/inputmethod/voice/RecognitionView.java index 1e99c3cf7..7cec0b04a 100644 --- a/java/src/com/android/inputmethod/voice/RecognitionView.java +++ b/java/src/com/android/inputmethod/voice/RecognitionView.java @@ -274,12 +274,11 @@ public class RecognitionView { final int count = (endIndex - startIndex) / numSamplePerWave; final float deltaX = 1.0f * w / count; - int yMax = h / 2 - 10; + int yMax = h / 2 - 8; Path path = new Path(); c.translate(0, yMax); float x = 0; path.moveTo(x, 0); - yMax -= 10; for (int i = 0; i < count; i++) { final int avabs = getAverageAbs(waveBuffer, startIndex, i , numSamplePerWave); int sign = ( (i & 01) == 0) ? -1 : 1; @@ -297,8 +296,8 @@ public class RecognitionView { mImage.setImageBitmap(b); mImage.setVisibility(View.VISIBLE); MarginLayoutParams mProgressParams = (MarginLayoutParams)mProgress.getLayoutParams(); - mProgressParams.topMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, - -h / 2 - 18, mContext.getResources().getDisplayMetrics()); + mProgressParams.topMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, + -h , mContext.getResources().getDisplayMetrics()); // Tweak the padding manually to fill out the whole view horizontally. // TODO: Do this in the xml layout instead. |