From cb0283f00c6fc2c17e198db449c38a2a8de8dd70 Mon Sep 17 00:00:00 2001 From: Jamil Date: Thu, 6 Mar 2025 20:28:08 +0000 Subject: [PATCH] fix(android): Ensure Android layouts `fitsSystemWindows` (#8376) - Sets the `fitsSystemWindows` var to avoid overlapping any system controls - Makes all margin padding consistent at `@dimen/spacing_medium` so that no controls are right on the edge of the view Fixes: https://firezonehq.slack.com/archives/C08FPHECLUF/p1741266356394749 Fixes: #7094 --- kotlin/android/app/src/main/res/layout/activity_auth.xml | 3 ++- .../src/main/res/layout/activity_custom_uri_handler.xml | 4 +++- kotlin/android/app/src/main/res/layout/activity_main.xml | 4 +++- .../android/app/src/main/res/layout/activity_session.xml | 7 ++++++- .../android/app/src/main/res/layout/activity_settings.xml | 3 ++- .../app/src/main/res/layout/activity_vpn_permission.xml | 3 ++- .../app/src/main/res/layout/fragment_resource_details.xml | 3 ++- .../app/src/main/res/layout/fragment_settings_advanced.xml | 3 ++- .../app/src/main/res/layout/fragment_settings_logs.xml | 3 ++- .../android/app/src/main/res/layout/fragment_sign_in.xml | 3 ++- kotlin/android/app/src/main/res/layout/fragment_splash.xml | 3 ++- .../android/app/src/main/res/layout/list_item_resource.xml | 3 ++- website/src/components/Changelog/Android.tsx | 4 ++++ 13 files changed, 34 insertions(+), 12 deletions(-) diff --git a/kotlin/android/app/src/main/res/layout/activity_auth.xml b/kotlin/android/app/src/main/res/layout/activity_auth.xml index 1927b3820..274dc6315 100644 --- a/kotlin/android/app/src/main/res/layout/activity_auth.xml +++ b/kotlin/android/app/src/main/res/layout/activity_auth.xml @@ -5,8 +5,9 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + tools:context=".features.auth.ui.AuthActivity" android:padding="@dimen/spacing_medium" - tools:context=".features.auth.ui.AuthActivity"> + android:fitsSystemWindows="true"> + tools:context=".features.customuri.ui.CustomUriHandlerActivity" + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + tools:context=".core.presentation.MainActivity" + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> @@ -90,6 +92,7 @@ style="?attr/materialButtonOutlinedStyle" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginStart="@dimen/spacing_medium" android:layout_marginEnd="8dp" android:text="@string/settings" app:layout_constraintBottom_toBottomOf="parent" @@ -101,6 +104,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="8dp" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@string/sign_out" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -111,6 +115,7 @@ android:layout_width="200dp" android:layout_height="20dp" android:layout_marginTop="26dp" + android:layout_marginRight="@dimen/spacing_medium" android:textAlignment="textEnd" android:textSize="12sp" app:layout_constraintEnd_toEndOf="parent" diff --git a/kotlin/android/app/src/main/res/layout/activity_settings.xml b/kotlin/android/app/src/main/res/layout/activity_settings.xml index 93d302147..4ec49a71f 100644 --- a/kotlin/android/app/src/main/res/layout/activity_settings.xml +++ b/kotlin/android/app/src/main/res/layout/activity_settings.xml @@ -4,7 +4,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="@dimen/spacing_4x"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + tools:context=".features.permission.vpn.ui.VpnPermissionActivity" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> + android:padding="@dimen/spacing_medium" + android:fitsSystemWindows="true"> {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} + + Fixes a bug where UI controls could overlap with system controls on + some devices. + Fixes a bug that prevented certain Resource fields from being updated when they were updated in the admin portal.