diff --git a/java/res/values-land/config.xml b/java/res/values-land/config.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d93cc2ffada178ddfaa87921085f167bcb7a8c9 --- /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 0000000000000000000000000000000000000000..b3cd7278d68daa006ab8ad466819c852c73d5c78 --- /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 0000000000000000000000000000000000000000..b3cd7278d68daa006ab8ad466819c852c73d5c78 --- /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 d9ff8d7b9de859a70ec05254f7994a93f42a168b..194f2ed42a6406834f4999addf8454be9655ddbc 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 4e4993b24b639b062b947831c67f44fa40c8313c..8488c777b8df76340bac9fb58fa3f4d5be1c366d 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 68d93295ca68456c4f2aef4ab389ce8eea1600ba..08af5c5e3b4bae71c36f712a59db175f30493705 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