mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 23:55:21 +01:00
fixing back buttons
This commit is contained in:
parent
640b2ab19c
commit
ecfc04e772
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue