aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/values/dimens.xml5
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
2 files changed, 8 insertions, 7 deletions
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index 101c6ab1b..50eca4bdb 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -95,8 +95,9 @@
<integer name="center_suggestion_percentile">36</integer>
<!-- If the screen height in landscape is larger than the below value, then the keyboard
- will not go into extract (fullscreen) mode. -->
- <dimen name="max_height_for_fullscreen">2.5in</dimen>
+ will not go into extract (fullscreen) mode.
+ Current value is approximate to 7-inch tablet height - system navigation bar height. -->
+ <dimen name="max_height_for_fullscreen">500dip</dimen>
<dimen name="key_hysteresis_distance">0.05in</dimen>
</resources>
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();