Fixed Gradient theme queue sheet
This commit is contained in:
parent
e27bf9d2cb
commit
2975a33e95
3 changed files with 8 additions and 8 deletions
|
@ -81,7 +81,7 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
|
||||||
private var recyclerViewTouchActionGuardManager: RecyclerViewTouchActionGuardManager? = null
|
private var recyclerViewTouchActionGuardManager: RecyclerViewTouchActionGuardManager? = null
|
||||||
private var playingQueueAdapter: PlayingQueueAdapter? = null
|
private var playingQueueAdapter: PlayingQueueAdapter? = null
|
||||||
private lateinit var linearLayoutManager: LinearLayoutManager
|
private lateinit var linearLayoutManager: LinearLayoutManager
|
||||||
private var bottomInsets = 0
|
private var navBarHeight = 0
|
||||||
|
|
||||||
private var _binding: FragmentGradientPlayerBinding? = null
|
private var _binding: FragmentGradientPlayerBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
@ -92,8 +92,8 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
|
||||||
binding.playerQueueSheet.updatePadding(
|
binding.playerQueueSheet.updatePadding(
|
||||||
top = (slideOffset * binding.statusBarLayout.statusBar.height).toInt()
|
top = (slideOffset * binding.statusBarLayout.statusBar.height).toInt()
|
||||||
)
|
)
|
||||||
binding.container.updatePadding(
|
binding.recyclerView.updatePadding(
|
||||||
bottom = ((1 - slideOffset) * bottomInsets).toInt()
|
top = ((1 - slideOffset) * navBarHeight).toInt()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,8 +161,8 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(
|
ViewCompat.setOnApplyWindowInsetsListener(
|
||||||
(binding.container)
|
(binding.container)
|
||||||
) { v: View, insets: WindowInsetsCompat ->
|
) { v: View, insets: WindowInsetsCompat ->
|
||||||
bottomInsets = insets.safeGetBottomInsets()
|
navBarHeight = insets.safeGetBottomInsets()
|
||||||
v.updatePadding(bottom = bottomInsets)
|
binding.recyclerView.updatePadding(top = navBarHeight)
|
||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
binding.playbackControlsFragment.root.drawAboveSystemBars()
|
binding.playbackControlsFragment.root.drawAboveSystemBars()
|
||||||
|
@ -479,7 +479,7 @@ class GradientPlayerFragment : AbsPlayerFragment(R.layout.fragment_gradient_play
|
||||||
oldBottom: Int
|
oldBottom: Int
|
||||||
) {
|
) {
|
||||||
val panel = getQueuePanel()
|
val panel = getQueuePanel()
|
||||||
panel.peekHeight = binding.container.height
|
panel.peekHeight = binding.container.height + navBarHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
|
|
|
@ -201,7 +201,7 @@ class PlayingNotificationImpl(
|
||||||
if (!isPlaying) {
|
if (!isPlaying) {
|
||||||
addAction(buildDismissAction())
|
addAction(buildDismissAction())
|
||||||
} else {
|
} else {
|
||||||
mActions.removeAt(4)
|
if (mActions.size == 5) mActions.removeAt(4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="?attr/colorSurface"
|
android:background="?attr/colorSurface"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/container"
|
app:layout_constraintTop_toBottomOf="@id/container"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue