From cd261dc8e10fabb117ac80f4038288175ee85558 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 20 Jun 2019 12:29:55 +0200 Subject: [PATCH] adding some constants related to slideshow animations --- .../com/simplemobiletools/gallery/pro/helpers/Config.kt | 4 ++++ .../com/simplemobiletools/gallery/pro/helpers/Constants.kt | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt index 5ac100f0c..45642f914 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt @@ -307,6 +307,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(SLIDESHOW_MOVE_BACKWARDS, false) set(slideshowMoveBackwards) = prefs.edit().putBoolean(SLIDESHOW_MOVE_BACKWARDS, slideshowMoveBackwards).apply() + var slideshowAnimation: Int + get() = prefs.getInt(SLIDESHOW_ANIMATION, SLIDESHOW_ANIMATION_SLIDE) + set(slideshowAnimation) = prefs.edit().putInt(SLIDESHOW_ANIMATION, slideshowAnimation).apply() + var loopSlideshow: Boolean get() = prefs.getBoolean(SLIDESHOW_LOOP, false) set(loopSlideshow) = prefs.edit().putBoolean(SLIDESHOW_LOOP, loopSlideshow).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt index 4d34894ad..267ec5ab2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt @@ -85,11 +85,17 @@ const val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos" const val SLIDESHOW_INCLUDE_GIFS = "slideshow_include_gifs" const val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order" const val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards" +const val SLIDESHOW_ANIMATION = "slideshow_animation" const val SLIDESHOW_LOOP = "loop_slideshow" const val SLIDESHOW_DEFAULT_INTERVAL = 5 const val SLIDESHOW_SCROLL_DURATION = 500L const val SLIDESHOW_START_ON_ENTER = "slideshow_start_on_enter" +// slideshow animations +const val SLIDESHOW_ANIMATION_NONE = 0 +const val SLIDESHOW_ANIMATION_SLIDE = 1 +const val SLIDESHOW_ANIMATION_FADE = 2 + const val NOMEDIA = ".nomedia" const val FAVORITES = "favorites" const val RECYCLE_BIN = "recycle_bin"