Use full screen mode on landscape/phone device

Bug: 5262767
Change-Id: I721c18522c972ced9f359f2e5208572d54a4b7a1
main
Tadashi G. Takaoka 2011-09-08 10:27:36 +09:00
parent 6b97d2b9c2
commit 2be872555c
6 changed files with 71 additions and 14 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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