Fixed Gradient theme queue sheet

This commit is contained in:
Prathamesh More 2021-12-12 12:35:46 +05:30
parent e27bf9d2cb
commit 2975a33e95
3 changed files with 8 additions and 8 deletions

View file

@ -81,7 +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 navBarHeight = 0
private var _binding: FragmentGradientPlayerBinding? = null
private val binding get() = _binding!!
@ -92,8 +92,8 @@ 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()
binding.recyclerView.updatePadding(
top = ((1 - slideOffset) * navBarHeight).toInt()
)
}
@ -161,8 +161,8 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
ViewCompat.setOnApplyWindowInsetsListener(
(binding.container)
) { v: View, insets: WindowInsetsCompat ->
bottomInsets = insets.safeGetBottomInsets()
v.updatePadding(bottom = bottomInsets)
navBarHeight = insets.safeGetBottomInsets()
binding.recyclerView.updatePadding(top = navBarHeight)
insets
}
binding.playbackControlsFragment.root.drawAboveSystemBars()
@ -479,7 +479,7 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
oldBottom: Int
) {
val panel = getQueuePanel()
panel.peekHeight = binding.container.height
panel.peekHeight = binding.container.height + navBarHeight
}
private fun setupRecyclerView() {

View file

@ -201,7 +201,7 @@ class PlayingNotificationImpl(
if (!isPlaying) {
addAction(buildDismissAction())
} else {
mActions.removeAt(4)
if (mActions.size == 5) mActions.removeAt(4)
}
}