mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 17:49:03 +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)
|
setContentView(binding.root)
|
||||||
|
|
||||||
setVisibilities()
|
|
||||||
playerView = binding.playerView
|
playerView = binding.playerView
|
||||||
playerView.resizeMode = preferences.getPlayerViewMode()
|
playerView.resizeMode = preferences.getPlayerViewMode()
|
||||||
youTubeDoubleTap = binding.youtubeOverlay
|
youTubeDoubleTap = binding.youtubeOverlay
|
||||||
|
@ -334,6 +333,8 @@ class PlayerActivity : AppCompatActivity() {
|
||||||
override fun create(): AlertDialog {
|
override fun create(): AlertDialog {
|
||||||
return super.create().apply {
|
return super.create().apply {
|
||||||
val window = this.window ?: return@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)
|
val alertWindowInsetsController = WindowInsetsControllerCompat(window, window.decorView)
|
||||||
alertWindowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
|
alertWindowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
|
||||||
alertWindowInsetsController.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
alertWindowInsetsController.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||||
|
@ -595,6 +596,11 @@ class PlayerActivity : AppCompatActivity() {
|
||||||
super.onStart()
|
super.onStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
setVisibilities()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
saveEpisodeHistory(EpisodeItem(episode, anime))
|
saveEpisodeHistory(EpisodeItem(episode, anime))
|
||||||
setEpisodeProgress(episode, anime, exoPlayer.currentPosition, exoPlayer.duration)
|
setEpisodeProgress(episode, anime, exoPlayer.currentPosition, exoPlayer.duration)
|
||||||
|
|
Loading…
Reference in a new issue