abouttreesummaryrefslogcommitdiff
path: root/res
diff options
context:
space:
mode:
authorJules Aguillon2024-12-26 18:29:19 +0100
committerGitHub2024-12-26 18:29:19 +0100
commit370f921bc367613164d93dc1ddbd28c57042e0a7 (patch)
tree2e437ccf8966fbd59a8b0b9c70f6f47dcc8a497e /res
parent57dbf3292fa7900f99fe503195d6cf20022eb653 (diff)
downloadunexpected-keyboard-370f921bc367613164d93dc1ddbd28c57042e0a7.tar.gz
unexpected-keyboard-370f921bc367613164d93dc1ddbd28c57042e0a7.zip
Proper support for Android 15 edge-to-edge (#848)
The keyboard background now extends under the system bars and display cutout on Android 15 but the keys do not. The back and IME switching buttons that appear in the navigation bar require special care to not overlap with the keyboard. The launcher and settings activity are also fixed.
Diffstat (limited to 'res')
-rw-r--r--res/layout/launcher_activity.xml2
-rw-r--r--res/values/styles.xml5
-rw-r--r--res/values/values.xml6
3 files changed, 11 insertions, 2 deletions
diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml
index 617c9ee..2273641 100644
--- a/res/layout/launcher_activity.xml
+++ b/res/layout/launcher_activity.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true">
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:fitsSystemWindows="true">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
<TextView style="@style/paragraph" android:text="@string/launcher_description"/>
<Button style="@style/paragraph" android:text="@string/launcher_button_imesettings" android:onClick="launch_imesettings" android:layout_width="wrap_content"/>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index bf4773d..f592cd7 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -80,4 +80,9 @@
<item name="android:orientation">horizontal</item>
</style>
<style name="appTheme" parent="@android:style/Theme.DeviceDefault.DayNight"/>
+ <style name="settingsTheme" parent="appTheme">
+ <!-- Setting this in the activity theme so it propagate to nested
+ preference screens. -->
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
</resources>
diff --git a/res/values/values.xml b/res/values/values.xml
index b13296b..d506011 100644
--- a/res/values/values.xml
+++ b/res/values/values.xml
@@ -6,5 +6,9 @@
<dimen name="emoji_text_size">28dp</dimen>
<dimen name="clipboard_view_height">300dp</dimen>
<dimen name="pref_button_size">28dp</dimen>
- <bool name="debug_logs">false</bool> <!-- Will be overwritten automatically by Gradle for the debug build variant -->
+ <!-- Margin needed to accomodate the gesture nav bar on Android 15. Found in
+ [core/res/res/values/dimens.xml]. -->
+ <dimen name="bottom_inset_min">48dp</dimen>
+ <!-- Will be overwritten automatically by Gradle for the debug build variant -->
+ <bool name="debug_logs">false</bool>
</resources>