mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-27 01:56:26 +00:00
Added better one-handed width for large screen devices
This commit is contained in:
parent
2030d82854
commit
53a904af1e
3 changed files with 5 additions and 2 deletions
|
@ -185,7 +185,7 @@ public final class ResourceUtils {
|
|||
public static int getKeyboardWidth(final Resources res, final SettingsValues settingsValues) {
|
||||
final int defaultKeyboardWidth = getDefaultKeyboardWidth(res);
|
||||
if (settingsValues.mOneHandedModeEnabled) {
|
||||
return (int) res.getFraction(R.fraction.config_one_handed_mode_width_ratio,
|
||||
return (int) res.getFraction(R.fraction.config_one_handed_mode_width,
|
||||
defaultKeyboardWidth, defaultKeyboardWidth);
|
||||
}
|
||||
return defaultKeyboardWidth;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
<resources>
|
||||
<dimen name="config_key_hysteresis_distance">40.0dp</dimen>
|
||||
|
||||
<!-- Amount of width reduction in one-handed mode -->
|
||||
<fraction name="config_one_handed_mode_width">76%</fraction>
|
||||
|
||||
<!-- Preferable keyboard height in absolute scale: 48.0mm -->
|
||||
<!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
|
||||
<dimen name="config_default_keyboard_height">302.4dp</dimen>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<dimen name="config_key_hysteresis_distance">8.0dp</dimen>
|
||||
|
||||
<!-- Amount of width reduction in one-handed mode -->
|
||||
<fraction name="config_one_handed_mode_width_ratio">86%</fraction>
|
||||
<fraction name="config_one_handed_mode_width">86%</fraction>
|
||||
|
||||
<!-- Preferable keyboard height in absolute scale: 1.285in -->
|
||||
<!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
|
||||
|
|
Loading…
Add table
Reference in a new issue