diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/gradient/GradientPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/gradient/GradientPlayerFragment.kt index 0bc5cd2d..ed0c3dca 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/gradient/GradientPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/gradient/GradientPlayerFragment.kt @@ -81,6 +81,7 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play private var recyclerViewTouchActionGuardManager: RecyclerViewTouchActionGuardManager? = null private var playingQueueAdapter: PlayingQueueAdapter? = null private lateinit var linearLayoutManager: LinearLayoutManager + private var bottomInsets = 0 private var _binding: FragmentGradientPlayerBinding? = null private val binding get() = _binding!! @@ -91,6 +92,9 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play binding.playerQueueSheet.updatePadding( top = (slideOffset * binding.statusBarLayout.statusBar.height).toInt() ) + binding.container.updatePadding( + bottom = ((1 - slideOffset) * bottomInsets).toInt() + ) } override fun onStateChanged(bottomSheet: View, newState: Int) { @@ -157,7 +161,8 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play ViewCompat.setOnApplyWindowInsetsListener( (binding.container) ) { v: View, insets: WindowInsetsCompat -> - v.updatePadding(bottom = insets.safeGetBottomInsets()) + bottomInsets = insets.safeGetBottomInsets() + v.updatePadding(bottom = bottomInsets) insets } binding.playbackControlsFragment.root.drawAboveSystemBars() diff --git a/app/src/main/res/layout/fragment_gradient_player.xml b/app/src/main/res/layout/fragment_gradient_player.xml index 2638c7c5..5d5ea4b2 100644 --- a/app/src/main/res/layout/fragment_gradient_player.xml +++ b/app/src/main/res/layout/fragment_gradient_player.xml @@ -66,6 +66,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" app:behavior_hideable="false" + app:gestureInsetBottomIgnored="true" app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior">