aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-01-24 16:08:33 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-01-24 18:14:20 +0900
commitff961ddf8c58df569c97684bfd83a01b2a9470aa (patch)
treebb26b90bec7415b832cf3c1ded7c40f2b4edcaf1 /java/src/com/android/inputmethod/latin/LatinIME.java
parentef43cc9d1c78d051b3d2923ce3166e9703d4b2ce (diff)
downloadlatinime-ff961ddf8c58df569c97684bfd83a01b2a9470aa.tar.gz
latinime-ff961ddf8c58df569c97684bfd83a01b2a9470aa.tar.xz
latinime-ff961ddf8c58df569c97684bfd83a01b2a9470aa.zip
Add preliminary graphics of sliding key input preview
Bug: 7548583 Change-Id: Idde6a62f9e64458055c99c893b71c02d1adc7b04
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 70eb6e657..6f11acf1a 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -71,7 +71,6 @@ import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
-import com.android.inputmethod.keyboard.KeyboardView;
import com.android.inputmethod.keyboard.MainKeyboardView;
import com.android.inputmethod.latin.Utils.Stats;
import com.android.inputmethod.latin.define.ProductionFlag;
@@ -653,6 +652,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
super.onStartInputView(editorInfo, restarting);
final KeyboardSwitcher switcher = mKeyboardSwitcher;
final MainKeyboardView mainKeyboardView = switcher.getMainKeyboardView();
+ final SettingsValues currentSettings = mSettings.getCurrent();
if (editorInfo == null) {
Log.e(TAG, "Null EditorInfo in onStartInputView()");
@@ -706,7 +706,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
accessUtils.onStartInputViewInternal(mainKeyboardView, editorInfo, restarting);
}
- final boolean inputTypeChanged = !mSettings.getCurrent().isSameInputType(editorInfo);
+ final boolean inputTypeChanged = !currentSettings.isSameInputType(editorInfo);
final boolean isDifferentTextField = !restarting || inputTypeChanged;
if (isDifferentTextField) {
mSubtypeSwitcher.updateParametersOnStartInputView();
@@ -737,12 +737,11 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
mainKeyboardView.closing();
loadSettings();
- if (mSuggest != null && mSettings.getCurrent().mCorrectionEnabled) {
- mSuggest.setAutoCorrectionThreshold(
- mSettings.getCurrent().mAutoCorrectionThreshold);
+ if (mSuggest != null && currentSettings.mCorrectionEnabled) {
+ mSuggest.setAutoCorrectionThreshold(currentSettings.mAutoCorrectionThreshold);
}
- switcher.loadKeyboard(editorInfo, mSettings.getCurrent());
+ switcher.loadKeyboard(editorInfo, currentSettings);
} else if (restarting) {
// TODO: Come up with a more comprehensive way to reset the keyboard layout when
// a keyboard layout set doesn't get reloaded in this method.
@@ -764,12 +763,14 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
mHandler.cancelDoubleSpacePeriodTimer();
mainKeyboardView.setMainDictionaryAvailability(mIsMainDictionaryAvailable);
- mainKeyboardView.setKeyPreviewPopupEnabled(mSettings.getCurrent().mKeyPreviewPopupOn,
- mSettings.getCurrent().mKeyPreviewPopupDismissDelay);
+ mainKeyboardView.setKeyPreviewPopupEnabled(currentSettings.mKeyPreviewPopupOn,
+ currentSettings.mKeyPreviewPopupDismissDelay);
+ mainKeyboardView.setSlidingKeyInputPreviewEnabled(
+ currentSettings.mSlidingKeyInputPreviewEnabled);
mainKeyboardView.setGestureHandlingEnabledByUser(
- mSettings.getCurrent().mGestureInputEnabled);
- mainKeyboardView.setGesturePreviewMode(mSettings.getCurrent().mGesturePreviewTrailEnabled,
- mSettings.getCurrent().mGestureFloatingPreviewTextEnabled);
+ currentSettings.mGestureInputEnabled);
+ mainKeyboardView.setGesturePreviewMode(currentSettings.mGesturePreviewTrailEnabled,
+ currentSettings.mGestureFloatingPreviewTextEnabled);
// If we have a user dictionary addition in progress, we should check now if we should
// replace the previously committed string with the word that has actually been added