Make dismissing keyboard by swiping down as configurable
Bug: 3306370 Change-Id: If4e258ce4db05fb75dcd3b23fefa422c1287955b
This commit is contained in:
parent
23a3b74722
commit
363cd6ef0f
3 changed files with 14 additions and 6 deletions
|
@ -23,6 +23,7 @@
|
|||
<bool name="config_enable_show_subtype_settings">false</bool>
|
||||
<bool name="config_enable_show_voice_key_option">false</bool>
|
||||
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
|
||||
<bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool>
|
||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_popup_preview">false</bool>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<bool name="config_enable_show_subtype_settings">true</bool>
|
||||
<bool name="config_enable_show_voice_key_option">true</bool>
|
||||
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
|
||||
<bool name="config_swipe_down_dismiss_keyboard_enabled">true</bool>
|
||||
<bool name="config_sliding_key_input_enabled">true</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_popup_preview">true</bool>
|
||||
|
|
|
@ -155,6 +155,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
private boolean mPopupOn;
|
||||
private boolean mAutoCap;
|
||||
private boolean mQuickFixes;
|
||||
private boolean mConfigSwipeDownDismissKeyboardEnabled;
|
||||
|
||||
private int mCorrectionMode;
|
||||
private int mCommittedLength;
|
||||
|
@ -310,15 +311,19 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
LatinImeLogger.init(this, prefs);
|
||||
SubtypeSwitcher.init(this, prefs);
|
||||
KeyboardSwitcher.init(this, prefs);
|
||||
|
||||
super.onCreate();
|
||||
//setStatusIcon(R.drawable.ime_qwerty);
|
||||
mResources = getResources();
|
||||
|
||||
mImm = ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE));
|
||||
final Configuration conf = mResources.getConfiguration();
|
||||
mSubtypeSwitcher = SubtypeSwitcher.getInstance();
|
||||
mKeyboardSwitcher = KeyboardSwitcher.getInstance();
|
||||
|
||||
final Resources res = getResources();
|
||||
mResources = res;
|
||||
mReCorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED,
|
||||
getResources().getBoolean(R.bool.default_recorrection_enabled));
|
||||
res.getBoolean(R.bool.default_recorrection_enabled));
|
||||
mConfigSwipeDownDismissKeyboardEnabled = res.getBoolean(
|
||||
R.bool.config_swipe_down_dismiss_keyboard_enabled);
|
||||
|
||||
Utils.GCUtils.getInstance().reset();
|
||||
boolean tryGC = true;
|
||||
|
@ -331,7 +336,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
}
|
||||
}
|
||||
|
||||
mOrientation = conf.orientation;
|
||||
mOrientation = res.getConfiguration().orientation;
|
||||
initSuggestPuncList();
|
||||
|
||||
// register to receive ringer mode changes for silent mode
|
||||
|
@ -1875,7 +1880,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
@Override
|
||||
public void onSwipeDown() {
|
||||
handleClose();
|
||||
if (mConfigSwipeDownDismissKeyboardEnabled)
|
||||
handleClose();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue