diff options
author | 2011-04-22 11:09:48 +0900 | |
---|---|---|
committer | 2011-04-22 17:02:38 +0900 | |
commit | c5c57b506e97b334a394d23ed73c9597cb55707a (patch) | |
tree | a6352d17858118b4fcef5bb63568d4bef3f748d1 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | c121b5d03e978b880057da31b9a9d78674b414cb (diff) | |
download | latinime-c5c57b506e97b334a394d23ed73c9597cb55707a.tar.gz latinime-c5c57b506e97b334a394d23ed73c9597cb55707a.tar.xz latinime-c5c57b506e97b334a394d23ed73c9597cb55707a.zip |
Move sliding language switch code to PointerTracker
This change is hack and temporal.
Big: 4328445
Change-Id: I0b8851e9f05390db20ddaa10f35cff1cc9f016da
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index f9bcfc655..28fd6aad7 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -359,11 +359,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final LatinKeyboardView inputView = mKeyboardSwitcher.getInputView(); if (inputView != null) { final LatinKeyboard keyboard = mKeyboardSwitcher.getLatinKeyboard(); + // The language is always displayed when the delay is negative. + final boolean needsToDisplayLanguage = localeChanged + || mConfigDelayBeforeFadeoutLanguageOnSpacebar < 0; // The language is never displayed when the delay is zero. if (mConfigDelayBeforeFadeoutLanguageOnSpacebar != 0) - inputView.setSpacebarTextFadeFactor(localeChanged ? 1.0f + inputView.setSpacebarTextFadeFactor(needsToDisplayLanguage ? 1.0f : mConfigFinalFadeoutFactorOfLanguageOnSpacebar, keyboard); - // The language is always displayed when the delay is negative. + // The fadeout animation will start when the delay is positive. if (localeChanged && mConfigDelayBeforeFadeoutLanguageOnSpacebar > 0) { sendMessageDelayed(obtainMessage(MSG_FADEOUT_LANGUAGE_ON_SPACEBAR, keyboard), mConfigDelayBeforeFadeoutLanguageOnSpacebar); @@ -2058,7 +2061,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void onRelease(int primaryCode, boolean withSliding) { KeyboardSwitcher switcher = mKeyboardSwitcher; // Reset any drag flags in the keyboard - switcher.keyReleased(); final boolean distinctMultiTouch = switcher.hasDistinctMultitouch(); if (distinctMultiTouch && primaryCode == Keyboard.CODE_SHIFT) { switcher.onReleaseShift(withSliding); |