aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-23 12:24:27 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-12-23 12:44:40 +0900
commit363cd6ef0f8f8af41a01964a2f0e800f9305d3a2 (patch)
treee91a50cd48efeb4cbb639859f9f42c3cbbbfd431 /java/src
parent23a3b74722e66fe6998b7eb33292ac6a4e10150d (diff)
downloadlatinime-363cd6ef0f8f8af41a01964a2f0e800f9305d3a2.tar.gz
latinime-363cd6ef0f8f8af41a01964a2f0e800f9305d3a2.tar.xz
latinime-363cd6ef0f8f8af41a01964a2f0e800f9305d3a2.zip
Make dismissing keyboard by swiping down as configurable
Bug: 3306370 Change-Id: If4e258ce4db05fb75dcd3b23fefa422c1287955b
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e9f200a8b..51b56ec14 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -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