Fixed bottom insets in Gradient theme
This commit is contained in:
parent
ef1d24d7f9
commit
76fc04cc99
2 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -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">
|
||||
|
||||
<LinearLayout
|
||||
|
|
Loading…
Reference in a new issue