abouttreesummaryrefslogcommitdiff
path: root/srcs
diff options
context:
space:
mode:
authorJules Aguillon2022-06-06 15:26:07 +0200
committerJules Aguillon2022-06-06 15:33:39 +0200
commitf6338a652b29767405894ae8f5ea41517767c557 (patch)
tree342fdde9c1b0b40e5d1d89d12ddb95c9a0589247 /srcs
parent9a42fa4dca4eea0cca77841d361fe8256597aa55 (diff)
downloadunexpected-keyboard-f6338a652b29767405894ae8f5ea41517767c557.tar.gz
unexpected-keyboard-f6338a652b29767405894ae8f5ea41517767c557.zip
New setting: Keyboard height in landscape mode
The previous fixed value of 55% was too high. The new default value is 50% and it is customizable.
Diffstat (limited to 'srcs')
-rw-r--r--srcs/juloo.keyboard2/Config.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java
index 054fc41..552aadf 100644
--- a/srcs/juloo.keyboard2/Config.java
+++ b/srcs/juloo.keyboard2/Config.java
@@ -94,13 +94,12 @@ final class Config
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
Resources res = context.getResources();
DisplayMetrics dm = res.getDisplayMetrics();
- // The height of the keyboard is relative to the height of the screen. This
- // is not the actual size of the keyboard, which will be bigger if the
- // layout has a fifth row.
+ // The height of the keyboard is relative to the height of the screen.
+ // This is the height of the keyboard if it have 4 rows.
int keyboardHeightPercent;
if (res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) // Landscape mode
{
- keyboardHeightPercent = 55;
+ keyboardHeightPercent = prefs.getInt("keyboard_height_landscape", 50);
}
else
{