diff options
| author | Jules Aguillon | 2025-06-29 16:18:49 +0200 |
|---|---|---|
| committer | GitHub | 2025-06-29 16:18:49 +0200 |
| commit | f36a7c8e9d123c268c559a946304c45360b36810 (patch) | |
| tree | b56771f69199a8fcf5d39c8bc7666eb21310959c /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | 004ed95dfdaf1afc61fe5df2c6309edcd5f6aa2b (diff) | |
| download | unexpected-keyboard-f36a7c8e9d123c268c559a946304c45360b36810.tar.gz unexpected-keyboard-f36a7c8e9d123c268c559a946304c45360b36810.zip | |
Fix unwanted bottom margin on Samsung OneUI 7 (#1022)
This fixes the unwanted margin at the bottom of the screen on
Samsung One UI 7 based on Android 15.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 23d2a0a..64fbea1 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -277,28 +277,13 @@ public class Keyboard2View extends View width = metrics.getBounds().width(); WindowInsets wi = metrics.getWindowInsets(); int insets_types = - WindowInsets.Type.statusBars() + WindowInsets.Type.systemBars() | WindowInsets.Type.displayCutout() - | WindowInsets.Type.mandatorySystemGestures() - | WindowInsets.Type.navigationBars(); + | WindowInsets.Type.mandatorySystemGestures(); Insets insets = wi.getInsets(insets_types); insets_left = insets.left; insets_right = insets.right; - // On API 35, the keyboard is allowed to draw under the - // button-navigation bar but on lower APIs, it must be discounted from - // the width. - if (VERSION.SDK_INT < 35) - { - Insets nav_insets = wi.getInsets(WindowInsets.Type.navigationBars()); - width -= nav_insets.left + nav_insets.right; - insets_left -= nav_insets.left; - insets_right -= nav_insets.right; - } - // [insets.bottom] doesn't take into account the buttons that appear in - // the gesture navigation bar when the IME is showing so ensure a minimum - // of margin is added. - if (VERSION.SDK_INT >= 35) - insets_bottom = Math.max(insets.bottom, _config.bottomInsetMin); + insets_bottom = Math.max(insets.bottom, _config.bottomInsetMin); } else { |
