Skip to content

Commit

Permalink
fix: content behind system bars in Android 15. fix menu background co…
Browse files Browse the repository at this point in the history
…lors
  • Loading branch information
jahirfiquitiva committed Jan 1, 2025
1 parent 365e0c2 commit 6b3169b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions library/src/main/res/drawable/menu_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?colorSurface" />
<corners android:radius="@dimen/small_components_corner_size" />
<padding
android:bottom="@dimen/medium_components_corner_size"
android:top="@dimen/medium_components_corner_size" />
</shape>
5 changes: 3 additions & 2 deletions library/src/main/res/layout/activity_fragments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_root_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
Expand All @@ -30,4 +31,4 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:fitsSystemWindows="true"
android:transitionName="appbar"
tools:ignore="UnusedAttribute">

Expand Down
5 changes: 3 additions & 2 deletions library/src/main/res/layout/activity_muzei_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
Expand Down Expand Up @@ -106,4 +107,4 @@

</androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
5 changes: 3 additions & 2 deletions library/src/main/res/layout/activity_recyclerview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_root_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
Expand All @@ -30,4 +31,4 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
1 change: 1 addition & 0 deletions library/src/main/res/values/m3_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<item name="android:forceDarkAllowed">true</item>

<item name="preferenceTheme">@style/Widget.Frames.PreferenceThemeOverlay.MaterialYou</item>
<item name="popupMenuBackground">@drawable/menu_background</item>
</style>

<style name="Frames.SplashScreen.Amoled.MaterialYou" parent="Frames.SplashScreen.MaterialYou" />
Expand Down
1 change: 1 addition & 0 deletions library/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:forceDarkAllowed">true</item>
<item name="popupMenuBackground">@drawable/menu_background</item>
</style>

<style name="Frames.SplashScreen.Amoled" parent="Frames.SplashScreen" />
Expand Down

0 comments on commit 6b3169b

Please sign in to comment.