mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
create the system for toggling the slideshow
This commit is contained in:
parent
1dec1b7457
commit
1d04016c9b
1 changed files with 14 additions and 0 deletions
|
@ -47,6 +47,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
private var mIsFullScreen = false
|
||||
private var mPos = -1
|
||||
private var mShowAll = false
|
||||
private var mIsSlideshowActive = false
|
||||
private var mRotationDegrees = 0f
|
||||
private var mLastHandledOrientation = 0
|
||||
private var mPrevHashcode = 0
|
||||
|
@ -249,7 +250,19 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun initSlideshow() {
|
||||
SlideshowDialog(this) {
|
||||
startSlideshow()
|
||||
}
|
||||
}
|
||||
|
||||
private fun startSlideshow() {
|
||||
hideSystemUI()
|
||||
mIsSlideshowActive = true
|
||||
}
|
||||
|
||||
private fun stopSlideshow() {
|
||||
if (mIsSlideshowActive) {
|
||||
showSystemUI()
|
||||
mIsSlideshowActive = false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -538,6 +551,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
if (mIsFullScreen) {
|
||||
hideSystemUI()
|
||||
} else {
|
||||
stopSlideshow()
|
||||
showSystemUI()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue