mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-25 22:29:45 +03:00
Fix system bars in internal player (#378)
This commit is contained in:
parent
ad15b2157e
commit
28301d09b9
1 changed files with 7 additions and 1 deletions
|
@ -138,7 +138,6 @@ class PlayerActivity : AppCompatActivity() {
|
|||
|
||||
setContentView(binding.root)
|
||||
|
||||
setVisibilities()
|
||||
playerView = binding.playerView
|
||||
playerView.resizeMode = preferences.getPlayerViewMode()
|
||||
youTubeDoubleTap = binding.youtubeOverlay
|
||||
|
@ -334,6 +333,8 @@ class PlayerActivity : AppCompatActivity() {
|
|||
override fun create(): AlertDialog {
|
||||
return super.create().apply {
|
||||
val window = this.window ?: return@apply
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
|
||||
val alertWindowInsetsController = WindowInsetsControllerCompat(window, window.decorView)
|
||||
alertWindowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
|
||||
alertWindowInsetsController.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||
|
@ -595,6 +596,11 @@ class PlayerActivity : AppCompatActivity() {
|
|||
super.onStart()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
setVisibilities()
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
saveEpisodeHistory(EpisodeItem(episode, anime))
|
||||
setEpisodeProgress(episode, anime, exoPlayer.currentPosition, exoPlayer.duration)
|
||||
|
|
Loading…
Reference in a new issue