Skip to content

Commit e385220

Browse files
committed
with edge-to-edge on Android 15, the app must draw its own background behind the status bar since the deprecated statusBarColor API no longer works. By ensuring the AppBarLayout has the proper background color and extends behind the status bar, the blue system background is no longer visible.
1 parent d1550d3 commit e385220

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Simplenote/src/main/java/com/automattic/simplenote/PreferencesActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ protected void onCreate(Bundle savedInstanceState) {
6060
}
6161

6262
// Setup edge-to-edge display with proper WindowInsets handling
63-
SystemBarUtils.setupEdgeToEdgeWithToolbar(
63+
// Use auto-theming to properly handle status bar appearance based on theme
64+
SystemBarUtils.setupEdgeToEdgeWithAutoTheming(
6465
this,
6566
findViewById(R.id.main_parent_view),
6667
toolbar,

Simplenote/src/main/res/layout/activity_preferences.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
android:id="@+id/main_parent_view"
66
android:layout_height="match_parent"
77
android:layout_width="match_parent"
8-
android:orientation="vertical">
8+
android:orientation="vertical"
9+
android:fitsSystemWindows="false">
910

1011
<include
1112
layout="@layout/toolbar">

Simplenote/src/main/res/layout/toolbar.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
xmlns:app="http://schemas.android.com/apk/res-auto"
66
android:layout_height="wrap_content"
77
android:layout_width="match_parent"
8+
android:background="?attr/toolbarColor"
9+
android:fitsSystemWindows="false"
810
android:theme="@style/ToolbarTheme.AppBarOverlay">
911

1012
<androidx.appcompat.widget.Toolbar

0 commit comments

Comments
 (0)