aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2010-08-31 20:43:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-31 20:43:31 -0700
commit5d95dfc2cb42132b88e2f6be63e1edcdb531cd94 (patch)
treebe4c75a73ab0ba4797cc91e1977ac9629edf71c8 /java/src
parent890c1d5fa3b38fa235883c5a6af6db452f63d60d (diff)
parent7bb640c1e06718936412af2c2198e09a57ce5124 (diff)
downloadlatinime-5d95dfc2cb42132b88e2f6be63e1edcdb531cd94.tar.gz
latinime-5d95dfc2cb42132b88e2f6be63e1edcdb531cd94.tar.xz
latinime-5d95dfc2cb42132b88e2f6be63e1edcdb531cd94.zip
am 7bb640c1: am 543dbdfd: Always present suggestion strip whenever in appropriate mode.
Merge commit '7bb640c1e06718936412af2c2198e09a57ce5124' * commit '7bb640c1e06718936412af2c2198e09a57ce5124': Always present suggestion strip whenever in appropriate mode.
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java27
1 files changed, 14 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e0a861a68..27d2f1d47 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -646,16 +646,14 @@ public class LatinIME extends InputMethodService
(attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) == 0) {
mInputTypeNoAutoCorrect = true;
}
- if ((attribute.inputType&EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
+ if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn = false;
- mCompletionOn = true && isFullscreenMode();
+ mCompletionOn = isFullscreenMode();
}
- updateShiftKeyState(attribute);
break;
default:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,
attribute.imeOptions, enableVoiceButton);
- updateShiftKeyState(attribute);
}
inputView.closing();
mComposing.setLength(0);
@@ -665,8 +663,9 @@ public class LatinIME extends InputMethodService
loadSettings();
updateShiftKeyState(attribute);
- setCandidatesViewShown(false);
- setSuggestions(null, false, false, false);
+ setCandidatesViewShownInternal(isCandidateStripVisible() || mCompletionOn,
+ false /* needsInputViewShown */ );
+ updateSuggestions();
// If the dictionary is not big enough, don't auto correct
mHasDictionary = mSuggest.hasMainDictionary();
@@ -830,21 +829,24 @@ public class LatinIME extends InputMethodService
// When in fullscreen mode, show completions generated by the application
setSuggestions(stringList, true, true, true);
mBestWord = null;
- setCandidatesViewShown(isCandidateStripVisible() || mCompletionOn);
+ setCandidatesViewShown(true);
}
}
- @Override
- public void setCandidatesViewShown(boolean shown) {
+ private void setCandidatesViewShownInternal(boolean shown, boolean needsInputViewShown) {
// TODO: Remove this if we support candidates with hard keyboard
if (onEvaluateInputViewShown()) {
- // Show the candidates view only if input view is showing
super.setCandidatesViewShown(shown && mKeyboardSwitcher.getInputView() != null
- && mKeyboardSwitcher.getInputView().isShown());
+ && (needsInputViewShown ? mKeyboardSwitcher.getInputView().isShown() : true));
}
}
@Override
+ public void setCandidatesViewShown(boolean shown) {
+ setCandidatesViewShownInternal(shown, true /* needsInputViewShown */ );
+ }
+
+ @Override
public void onComputeInsets(InputMethodService.Insets outInsets) {
super.onComputeInsets(outInsets);
if (!isFullscreenMode()) {
@@ -1429,8 +1431,7 @@ public class LatinIME extends InputMethodService
}
private boolean isPredictionOn() {
- boolean predictionOn = mPredictionOn;
- return predictionOn;
+ return mPredictionOn;
}
private boolean isCandidateStripVisible() {