fix: Fix status bar background in Home tab when Collapsing App Bar mode is enabled

This commit is contained in:
Prathamesh More 2023-03-10 11:12:37 +05:30
parent ea5072945e
commit 3ae38cb1de
2 changed files with 2 additions and 7 deletions

View file

@ -101,9 +101,6 @@ class HomeFragment :
colorButtons() colorButtons()
postponeEnterTransition() postponeEnterTransition()
view.doOnPreDraw { startPostponedEnterTransition() } view.doOnPreDraw { startPostponedEnterTransition() }
binding.appBarLayout.statusBarForeground =
MaterialShapeDrawable.createWithElevationOverlay(requireContext())
binding.toolbar.drawNextToNavbar()
view.doOnLayout { view.doOnLayout {
adjustPlaylistButtons() adjustPlaylistButtons()
} }
@ -178,7 +175,7 @@ class HomeFragment :
findNavController().navigate(R.id.action_search, null, navOptions) findNavController().navigate(R.id.action_search, null, navOptions)
} }
val hexColor = String.format("#%06X", 0xFFFFFF and accentColor()) val hexColor = String.format("#%06X", 0xFFFFFF and accentColor())
val appName = "Retro <span style='color:$hexColor';>Music</span>".parseAsHtml() val appName = "<font color=$hexColor>Retro Music</font>".parseAsHtml()
binding.appBarLayout.title = appName binding.appBarLayout.title = appName
} }

View file

@ -13,7 +13,6 @@
--> -->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
@ -23,8 +22,7 @@
style="?appBarLayoutStyle" style="?appBarLayoutStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fitsSystemWindows="true" android:fitsSystemWindows="true" />
android:theme="@style/CenteredCheckBoxTheme" />
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/container" android:id="@+id/container"