aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/values-xlarge/bools.xml23
-rw-r--r--java/res/values/bools.xml2
-rw-r--r--java/res/values/strings.xml3
-rw-r--r--java/res/xml/prefs.xml7
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java5
5 files changed, 40 insertions, 0 deletions
diff --git a/java/res/values-xlarge/bools.xml b/java/res/values-xlarge/bools.xml
new file mode 100644
index 000000000..fe8fc5838
--- /dev/null
+++ b/java/res/values-xlarge/bools.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="default_popup_preview">false</bool>
+</resources>
diff --git a/java/res/values/bools.xml b/java/res/values/bools.xml
index a0cebbb94..f5f2c3d0e 100644
--- a/java/res/values/bools.xml
+++ b/java/res/values/bools.xml
@@ -26,4 +26,6 @@
<!-- Whether or not voice input is enabled by default. -->
<bool name="voice_input_default">true</bool>
<bool name="config_swipeDisambiguation">true</bool>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="default_popup_preview">true</bool>
</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index e77155d50..d2166f7f5 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -29,6 +29,9 @@
<!-- Option to play back sound on keypress in soft keyboard -->
<string name="sound_on_keypress">Sound on keypress</string>
+ <!-- Option to pop up the character with a larger font above soft keyboard -->
+ <string name="popup_on_keypress">Popup on keypress</string>
+
<!-- Option to enable using nearby keys when correcting/predicting -->
<string name="hit_correction">Correct typing errors</string>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index e4c689aa8..11cc3ac42 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -31,6 +31,13 @@
/>
<CheckBoxPreference
+ android:key="popup_on"
+ android:title="@string/popup_on_keypress"
+ android:persistent="true"
+ android:defaultValue="@bool/default_popup_preview"
+ />
+
+ <CheckBoxPreference
android:key="auto_cap"
android:title="@string/auto_cap"
android:persistent="true"
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3ee9fe8eb..ace0b08a3 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -89,6 +89,7 @@ public class LatinIME extends InputMethodService
private static final String PREF_VIBRATE_ON = "vibrate_on";
private static final String PREF_SOUND_ON = "sound_on";
+ private static final String PREF_POPUP_ON = "popup_on";
private static final String PREF_AUTO_CAP = "auto_cap";
private static final String PREF_QUICK_FIXES = "quick_fixes";
private static final String PREF_SHOW_SUGGESTIONS = "show_suggestions";
@@ -198,6 +199,7 @@ public class LatinIME extends InputMethodService
private boolean mPasswordText;
private boolean mVibrateOn;
private boolean mSoundOn;
+ private boolean mPopupOn;
private boolean mAutoCap;
private boolean mQuickFixes;
private boolean mHasUsedVoiceInput;
@@ -670,6 +672,7 @@ public class LatinIME extends InputMethodService
updateCorrectionMode();
+ inputView.setPreviewEnabled(mPopupOn);
inputView.setProximityCorrectionEnabled(true);
mPredictionOn = mPredictionOn && (mCorrectionMode > 0 || mShowSuggestions);
checkTutorial(attribute.privateImeOptions);
@@ -2295,6 +2298,7 @@ public class LatinIME extends InputMethodService
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
mVibrateOn = sp.getBoolean(PREF_VIBRATE_ON, false);
mSoundOn = sp.getBoolean(PREF_SOUND_ON, false);
+ mPopupOn = sp.getBoolean(PREF_POPUP_ON, true);
mAutoCap = sp.getBoolean(PREF_AUTO_CAP, true);
mQuickFixes = sp.getBoolean(PREF_QUICK_FIXES, true);
mHasUsedVoiceInput = sp.getBoolean(PREF_HAS_USED_VOICE_INPUT, false);
@@ -2421,6 +2425,7 @@ public class LatinIME extends InputMethodService
p.println(" TextEntryState.state=" + TextEntryState.getState());
p.println(" mSoundOn=" + mSoundOn);
p.println(" mVibrateOn=" + mVibrateOn);
+ p.println(" mPopupOn=" + mPopupOn);
}
// Characters per second measurement