fixing back buttons

This commit is contained in:
Tule Simon 2023-04-22 18:50:56 +01:00
parent 640b2ab19c
commit ecfc04e772

View file

@ -30,6 +30,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.commit import androidx.fragment.app.commit
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
@ -178,6 +179,9 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
if (getQueuePanel().state == BottomSheetBehavior.STATE_EXPANDED) { if (getQueuePanel().state == BottomSheetBehavior.STATE_EXPANDED) {
getQueuePanel().state = BottomSheetBehavior.STATE_COLLAPSED getQueuePanel().state = BottomSheetBehavior.STATE_COLLAPSED
} }
else{
mainActivity.getBottomSheetBehavior().state=BottomSheetBehavior.STATE_COLLAPSED
}
} }
}) })
} }
@ -305,8 +309,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
binding.playerControlsContainer.songTotalTime.setTextColor(lastPlaybackControlsColor) binding.playerControlsContainer.songTotalTime.setTextColor(lastPlaybackControlsColor)
if (isLandscapeMode()) { if (isLandscapeMode()) {
val window = requireActivity().window mainActivity.setNavigationBarColor(color.backgroundColor)
window?.navigationBarColor = color.backgroundColor
} }
ViewUtil.setProgressDrawable( ViewUtil.setProgressDrawable(
@ -604,7 +607,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
val window = requireActivity().window val window = requireActivity().window
window?.navigationBarColor.let { navBarColor -> window?.navigationBarColor.let { navBarColor ->
if (navBarColor == null || navBarColor != color) { if (navBarColor == null || navBarColor != color) {
window?.navigationBarColor = color mainActivity.setNavigationBarColor(color)
} }
} }
} }