add new preference for popup preview
this option is disabled as the default at x-large Bug:2909517 Change-Id: Ifda1b7ff89bc4beeee02ba0f3e01d441a9435b37main
parent
8dbb0973e9
commit
0b0a686281
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
android:persistent="true"
|
||||
/>
|
||||
|
||||
<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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue