diff options
| author | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
| commit | c03f0464c1f834c2f4d8642cbfad322033d368b7 (patch) | |
| tree | 9b591265ba9800d520d3ea07c2d484879191e4c3 /app/src/main/res/layout/settings.xml | |
| parent | be7a012517905f0a36b2e68f0df7a311ca191fff (diff) | |
| download | scrcpy-android-c03f0464c1f834c2f4d8642cbfad322033d368b7.tar.gz | |
app: pad Main and Settings for system bar insets
targetSdk 35 makes every window edge-to-edge on Android 15. Neither
activity handled insets, so Main drew its header under the status bar
and the Settings ScrollView started at window y=0: the framework action
bar covered its first 80dp and the navigation bar covered the last rows.
Pad both roots by the system bar insets. Main adds the IME inset as
well, since an edge-to-edge window is not resized when the keyboard
opens. Settings drops the framework action bar and draws its own title
like Main already does, which removes the action-bar-versus-inset
interaction entirely.
Reported on the F-Droid submission (fdroiddata!41394).
Diffstat (limited to 'app/src/main/res/layout/settings.xml')
| -rw-r--r-- | app/src/main/res/layout/settings.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/res/layout/settings.xml b/app/src/main/res/layout/settings.xml index 5d4e450..76f706b 100644 --- a/app/src/main/res/layout/settings.xml +++ b/app/src/main/res/layout/settings.xml @@ -1,5 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Title lives in the layout, not in an action bar: the window is + edge-to-edge, so Ui.padForInsets() on this root is what keeps the + content clear of the system bars. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -10,6 +14,15 @@ android:padding="@dimen/space_lg"> <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/space_lg" + android:text="@string/settings" + android:textColor="@color/on_surface" + android:textSize="22sp" + android:textStyle="bold"/> + + <TextView style="@style/Note" android:layout_width="match_parent" android:layout_height="wrap_content" |