diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index 455508bbe..1b3660c02 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -24,6 +24,7 @@ class SettingsActivity : SimpleActivity() { setupShowHiddenFolders() setupAutoplayVideos() setupLoopVideos() + setupAnimateGifs() setupShowMedia() updateTextColors(settings_holder) } @@ -64,6 +65,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupAnimateGifs() { + settings_animate_gifs.isChecked = config.animateGifs + settings_animate_gifs_holder.setOnClickListener { + settings_animate_gifs.toggle() + config.animateGifs = settings_animate_gifs.isChecked + } + } + private fun setupShowMedia() { settings_show_media.text = getShowMediaText() settings_show_media_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt index f5941defa..10e2f63b1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -100,6 +100,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(AUTOPLAY_VIDEOS, false) set(autoplay) = prefs.edit().putBoolean(AUTOPLAY_VIDEOS, autoplay).apply() + var animateGifs: Boolean + get() = prefs.getBoolean(ANIMATE_GIFS, true) + set(animateGifs) = prefs.edit().putBoolean(ANIMATE_GIFS, animateGifs).apply() + var loopVideos: Boolean get() = prefs.getBoolean(LOOP_VIDEOS, false) set(loop) = prefs.edit().putBoolean(LOOP_VIDEOS, loop).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index 3d93c8ca5..8eb140cd1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -7,6 +7,7 @@ val SORT_FOLDER_PREFIX = "sort_folder_" val SHOW_HIDDEN_FOLDERS = "show_hidden_folders" val AUTOPLAY_VIDEOS = "autoplay_videos" val LOOP_VIDEOS = "loop_videos" +val ANIMATE_GIFS = "animate_gifs" val DISPLAY_FILE_NAMES = "display_file_names" val PINNED_FOLDERS = "pinned_folders" val DIR_COLUMN_CNT = "dir_column_cnt" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 8435932d4..4c16ebef1 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -109,6 +109,26 @@ + + + + + + Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index cb1b29e06..5e283f7f6 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -93,6 +93,7 @@ nur Videos Bilder und Videos Video Endlos-Schleife + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index ec286381e..e8e3f9c6a 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index bb1d9dfab..74ff1747f 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -93,6 +93,7 @@ Vidéos uniquement Images et vidéos Tourner en boucle les vidéos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-gl-rES/strings.xml b/app/src/main/res/values-gl-rES/strings.xml index ec286381e..e8e3f9c6a 100644 --- a/app/src/main/res/values-gl-rES/strings.xml +++ b/app/src/main/res/values-gl-rES/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index e69393a45..c2def88bb 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 7646db14a..71a473422 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 265d8c77b..834979cea 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 182add269..5f1cd91eb 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -93,6 +93,7 @@ Apenas vídeos Imagens e vídeos Vídeos em ciclo + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index b590cbed8..cd51a736a 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -93,6 +93,7 @@ Только видео Изображения и видео Повторять видео + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 7402cc929..8a110bf64 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -93,6 +93,7 @@ Iba videá Obrázky aj videá Automaticky reštartovať videá + Animovať gif súbory pri náhľade Bola pridaná možnosť vlastného zoradenia jednotlivých priečinkov diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 04376d40f..c266ad8c5 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -93,6 +93,7 @@ Endast videos Bilder och videos Återspela videos + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index f2cabe110..12814bae7 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -93,6 +93,7 @@ Yalnızca videolar Resimler ve videolar Videolar döngüsü + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8ca9db3f6..a0ced0366 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -93,6 +93,7 @@ 仅视频 图像和视频 循环播放视频 + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1a3ae954c..58f0ef5f8 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -93,6 +93,7 @@ 僅影片 圖片和影片 迴圈播放影片 + Animate gifs at thumbnails Allow setting different sorting per folder diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e69393a45..c2def88bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -93,6 +93,7 @@ Videos only Images and videos Loop videos + Animate gifs at thumbnails Allow setting different sorting per folder