diff options
author | 2011-09-07 01:08:51 -0700 | |
---|---|---|
committer | 2011-09-07 01:08:51 -0700 | |
commit | ed3758e33c897fa1ef0b4e1502fb2e589765ad3a (patch) | |
tree | 725e9b24ad10c762f1a4bf1efc084c94e37eec15 /java/src | |
parent | ae56d5c33de1faa7813fab301208d86934c6c934 (diff) | |
parent | f80b6a06992ae08ca3601f4fbc6da550fd9ac730 (diff) | |
download | latinime-ed3758e33c897fa1ef0b4e1502fb2e589765ad3a.tar.gz latinime-ed3758e33c897fa1ef0b4e1502fb2e589765ad3a.tar.xz latinime-ed3758e33c897fa1ef0b4e1502fb2e589765ad3a.zip |
Merge "Tune the threshold of fullscreen mode from 2.5in to 500dip"
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 191ae5811..68d93295c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1003,12 +1003,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if ((imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0) return false; } + final Resources res = mResources; - DisplayMetrics dm = res.getDisplayMetrics(); - float displayHeight = dm.heightPixels; - // If the display is more than X inches high, don't go to fullscreen mode - float dimen = res.getDimension(R.dimen.max_height_for_fullscreen); - if (displayHeight > dimen) { + final DisplayMetrics dm = res.getDisplayMetrics(); + // If the display is more than X DIP high, don't go to fullscreen mode + final int threshold = res.getDimensionPixelSize(R.dimen.max_height_for_fullscreen); + if (dm.heightPixels >= threshold) { return false; } else { return super.onEvaluateFullscreenMode(); |