Skip to content

[Bug][Android 15] Edge-to-edge layout overlapping in PreferencesActivity (targetSdk 35) #4723

Description

@Erro22

Describe the Bug

On Android 15 (API 35), system-enforced Edge-to-Edge (ENFORCE_EDGE_TO_EDGE) causes layout overlapping in PreferencesActivity when targeting SDK 35 (targetSdkVersion 35):

  1. Top overlap: The system status bar (clock, battery, icons) is rendered directly on top of the Toolbar (<- Settings and back button).
  2. Bottom overlap: The 3-button system navigation bar (Back, Home, Recents) overlaps the bottom preference items (e.g., "Root Explorer" switch and its description) without proper window insets.

Device & Environment Information

  • App Version: Amaze File Manager 3.11.3 (versionCode 125, targetSdkVersion 35)
  • Device Model: Xiaomi POCO X6 5G / Redmi Note 13 Pro 5G (garnet / 23122PCD1G)
  • Android Version: Android 15 (VanillaIceCream, API level 35)
  • ROM / OS Build: LineageOS 22 (lineage_garnet-userdebug 15 BP1A.250505.005)

Root Cause Analysis

In Android 15, edge-to-edge is mandatory for applications targeting API 35.
In res/layout/activity_preferences.xml, the root RelativeLayout does not have android:fitsSystemWindows="true", nor does PreferencesActivity apply WindowInsetsCompat to handle system bars padding.

Suggested Fix

Add android:fitsSystemWindows="true" to the root layout in activity_preferences.xml:

--- a/app/src/main/res/layout/activity_preferences.xml
+++ b/app/src/main/res/layout/activity_preferences.xml
@@ -2,3 +2,4 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@id/activity_preferences"
+    android:fitsSystemWindows="true"
     android:layout_width="match_parent"
     android:layout_height="match_parent">

Screenshots

  • Before (Overlapped UI with targetSdk 35 & missing insets):
    Before

  • After (Fixed with fitsSystemWindows / targetSdk 34 insets applied):
    After

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions