Skip to content

Commit

Permalink
Temporary fix for no Android 35 system bars
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Dec 21, 2024
1 parent 0bc00ce commit 6d94dd5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ class FittedSheets: BottomSheetDialogFragment() {
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
val view = inflater.inflate(R.layout.fitted_sheets, container, false)
val window = dialog?.window
if (Version.isLollipop) window?.statusBarColor = Color.TRANSPARENT
return view
return inflater.inflate(R.layout.fitted_sheets, container, false)
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/res/values-night-v35/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="buttonStyle">@style/SlimButton</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:navigationBarColor">@color/colorPrimary</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:windowSplashScreenBackground">@color/colorPrimary</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

<!-- Theme for the Preferences -->
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
</resources>
19 changes: 19 additions & 0 deletions app/src/main/res/values-v35/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.Bridge">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="buttonStyle">@style/SlimButton</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@color/colorPrimary</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowSplashScreenBackground">@color/colorPrimary</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

<!-- Theme for the Preferences -->
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
</resources>

0 comments on commit 6d94dd5

Please sign in to comment.