aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-09-07 12:50:48 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-09-07 16:37:50 +0900
commitf80b6a06992ae08ca3601f4fbc6da550fd9ac730 (patch)
treeaac429d42c5100c88fab4aa0902090faa46d8e02 /java/src
parentade62577d4fd776be5d2900cf3bd8583fcd8969f (diff)
downloadlatinime-f80b6a06992ae08ca3601f4fbc6da550fd9ac730.tar.gz
latinime-f80b6a06992ae08ca3601f4fbc6da550fd9ac730.tar.xz
latinime-f80b6a06992ae08ca3601f4fbc6da550fd9ac730.zip
Tune the threshold of fullscreen mode from 2.5in to 500dip
Bug: 5262767 Change-Id: Ie418ab766951a568d0f40822d8e8d719582749ba
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
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();