diff options
-rw-r--r-- | java/res/values-land/config.xml | 23 | ||||
-rw-r--r-- | java/res/values-sw600dp-land/config.xml | 23 | ||||
-rw-r--r-- | java/res/values-sw768dp-land/config.xml | 23 | ||||
-rw-r--r-- | java/res/values/config.xml | 1 | ||||
-rw-r--r-- | java/res/values/dimens.xml | 5 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
6 files changed, 71 insertions, 14 deletions
diff --git a/java/res/values-land/config.xml b/java/res/values-land/config.xml new file mode 100644 index 000000000..7d93cc2ff --- /dev/null +++ b/java/res/values-land/config.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources> + <bool name="config_use_fullscreen_mode">true</bool> +</resources> diff --git a/java/res/values-sw600dp-land/config.xml b/java/res/values-sw600dp-land/config.xml new file mode 100644 index 000000000..b3cd7278d --- /dev/null +++ b/java/res/values-sw600dp-land/config.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources> + <bool name="config_use_fullscreen_mode">false</bool> +</resources> diff --git a/java/res/values-sw768dp-land/config.xml b/java/res/values-sw768dp-land/config.xml new file mode 100644 index 000000000..b3cd7278d --- /dev/null +++ b/java/res/values-sw768dp-land/config.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources> + <bool name="config_use_fullscreen_mode">false</bool> +</resources> diff --git a/java/res/values/config.xml b/java/res/values/config.xml index d9ff8d7b9..194f2ed42 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -19,6 +19,7 @@ --> <resources> + <bool name="config_use_fullscreen_mode">false</bool> <bool name="config_enable_show_settings_key_option">true</bool> <bool name="config_default_show_settings_key">false</bool> <bool name="config_enable_show_voice_key_option">true</bool> diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index 4e4993b24..8488c777b 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -95,10 +95,5 @@ <integer name="suggestions_count_in_strip">3</integer> <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. - 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 68d93295c..08af5c5e3 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1004,15 +1004,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return false; } - final Resources res = mResources; - 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(); - } + return mResources.getBoolean(R.bool.config_use_fullscreen_mode); } @Override |