fix #857, improve fullscreen toggling at Immersive mode

This commit is contained in:
tibbi 2018-07-30 14:23:48 +02:00
parent 1567ca05fb
commit 74f88583d2

View file

@ -245,7 +245,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
window.decorView.setOnSystemUiVisibilityChangeListener { visibility -> 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 { view_pager.adapter?.let {
(it as MyPagerAdapter).toggleFullscreen(mIsFullScreen) (it as MyPagerAdapter).toggleFullscreen(mIsFullScreen)
checkSystemUI() checkSystemUI()