mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47: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 mIsFullScreen = false
|
||||||
private var mPos = -1
|
private var mPos = -1
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
|
private var mIsSlideshowActive = false
|
||||||
private var mRotationDegrees = 0f
|
private var mRotationDegrees = 0f
|
||||||
private var mLastHandledOrientation = 0
|
private var mLastHandledOrientation = 0
|
||||||
private var mPrevHashcode = 0
|
private var mPrevHashcode = 0
|
||||||
|
@ -249,7 +250,19 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun initSlideshow() {
|
private fun initSlideshow() {
|
||||||
SlideshowDialog(this) {
|
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) {
|
if (mIsFullScreen) {
|
||||||
hideSystemUI()
|
hideSystemUI()
|
||||||
} else {
|
} else {
|
||||||
|
stopSlideshow()
|
||||||
showSystemUI()
|
showSystemUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue