mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 00:39:14 +01:00
Make immersive mode slightly more reliable on rotation
This commit is contained in:
parent
7118817df7
commit
9dc184adff
@ -182,9 +182,18 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||||||
super.onSaveInstanceState(outState)
|
super.onSaveInstanceState(outState)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set menu visibility again on activity resume to apply immersive mode again if needed.
|
||||||
|
* Helps with rotations.
|
||||||
|
*/
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
setMenuVisibility(menuVisible, animate = false)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the window focus changes. It sets the menu visibility to the last known state
|
* Called when the window focus changes. It sets the menu visibility to the last known state
|
||||||
* to apply again System UI (for immersive mode).
|
* to apply immersive mode again if needed.
|
||||||
*/
|
*/
|
||||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||||
super.onWindowFocusChanged(hasFocus)
|
super.onWindowFocusChanged(hasFocus)
|
||||||
|
Loading…
Reference in New Issue
Block a user