aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-11-18 20:48:01 +0900
committersatok <satok@google.com>2010-11-18 20:50:37 +0900
commit279da1da91681923f2eba3d5e3d82f9ad87cd4b6 (patch)
tree246dbe975bb294ed22abeb43db5b5a8fcbaa4b28 /java/src/com/android/inputmethod/latin/BaseKeyboardView.java
parent3b776b78924610da2874f3ac555ed5d91a550843 (diff)
downloadlatinime-279da1da91681923f2eba3d5e3d82f9ad87cd4b6.tar.gz
latinime-279da1da91681923f2eba3d5e3d82f9ad87cd4b6.tar.xz
latinime-279da1da91681923f2eba3d5e3d82f9ad87cd4b6.zip
Hide space bar preview when space bar switcher is disabled.
Change-Id: I469197a4b3f55335eaee104177f0970cc904bb34
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BaseKeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/BaseKeyboardView.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
index 519244165..ad0e8d41a 100644
--- a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
+++ b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java
@@ -929,10 +929,11 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy {
// the space key preview and 3) pointer moves off the space key to other letter key, we
// should hide the preview of the previous key.
final boolean hidePreviewOrShowSpaceKeyPreview = (tracker == null)
- || tracker.isSpaceKey(keyIndex) || tracker.isSpaceKey(oldKeyIndex);
+ || (SubtypeSwitcher.USE_SPACEBAR_LANGUAGE_SWITCHER
+ && SubtypeSwitcher.getInstance().needsToDisplayLanguage()
+ && (tracker.isSpaceKey(keyIndex) || tracker.isSpaceKey(oldKeyIndex)));
// If key changed and preview is on or the key is space (language switch is enabled)
- if (oldKeyIndex != keyIndex && (mShowPreview || (hidePreviewOrShowSpaceKeyPreview
- && SubtypeSwitcher.getInstance().needsToDisplayLanguage()))) {
+ if (oldKeyIndex != keyIndex && (mShowPreview || (hidePreviewOrShowSpaceKeyPreview))) {
if (keyIndex == NOT_A_KEY) {
mHandler.cancelPopupPreview();
mHandler.dismissPreview(mDelayAfterPreview);