mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-25 00:07:40 +01:00
fix fullscreen toggle on some devices
This commit is contained in:
parent
a51083be16
commit
388a6dd2c1
@ -76,6 +76,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
mPos = 0
|
mPos = 0
|
||||||
mIsFullScreen = false
|
mIsFullScreen = false
|
||||||
mMedia = ArrayList<Medium>()
|
mMedia = ArrayList<Medium>()
|
||||||
|
showSystemUI()
|
||||||
|
|
||||||
mDirectory = File(mPath).parent
|
mDirectory = File(mPath).parent
|
||||||
title = mPath.getFilenameFromPath()
|
title = mPath.getFilenameFromPath()
|
||||||
@ -308,11 +309,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onSystemUiVisibilityChange(visibility: Int) {
|
override fun onSystemUiVisibilityChange(visibility: Int) {
|
||||||
|
view_pager.adapter?.apply {
|
||||||
if (visibility and View.SYSTEM_UI_FLAG_FULLSCREEN == 0) {
|
if (visibility and View.SYSTEM_UI_FLAG_FULLSCREEN == 0) {
|
||||||
mIsFullScreen = false
|
mIsFullScreen = false
|
||||||
|
showSystemUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
val adapter = view_pager.adapter as MyPagerAdapter
|
(this as MyPagerAdapter).updateUiVisibility(mIsFullScreen, mPos)
|
||||||
adapter.updateUiVisibility(mIsFullScreen, mPos)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user