fix #857, improve fullscreen toggling at Immersive mode
This commit is contained in:
parent
1567ca05fb
commit
74f88583d2
1 changed files with 6 additions and 1 deletions
|
@ -245,7 +245,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
window.decorView.setOnSystemUiVisibilityChangeListener { visibility ->
|
||||
mIsFullScreen = visibility and View.SYSTEM_UI_FLAG_FULLSCREEN != 0
|
||||
mIsFullScreen = if (visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE == 0) {
|
||||
false
|
||||
} else {
|
||||
visibility and View.SYSTEM_UI_FLAG_FULLSCREEN != 0
|
||||
}
|
||||
|
||||
view_pager.adapter?.let {
|
||||
(it as MyPagerAdapter).toggleFullscreen(mIsFullScreen)
|
||||
checkSystemUI()
|
||||
|
|
Loading…
Reference in a new issue