mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
added an option to toggle animating gifs at thumbnails
This commit is contained in:
parent
97554c36ed
commit
75816a1b77
20 changed files with 50 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -109,6 +109,26 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_animate_gifs_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_animate_gifs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/animate_gifs"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_media_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">nur Videos</string>
|
||||
<string name="images_and_videos">Bilder und Videos</string>
|
||||
<string name="loop_videos">Video Endlos-Schleife</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Vidéos uniquement</string>
|
||||
<string name="images_and_videos">Images et vidéos</string>
|
||||
<string name="loop_videos">Tourner en boucle les vidéos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Apenas vídeos</string>
|
||||
<string name="images_and_videos">Imagens e vídeos</string>
|
||||
<string name="loop_videos">Vídeos em ciclo</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Только видео</string>
|
||||
<string name="images_and_videos">Изображения и видео</string>
|
||||
<string name="loop_videos">Повторять видео</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Iba videá</string>
|
||||
<string name="images_and_videos">Obrázky aj videá</string>
|
||||
<string name="loop_videos">Automaticky reštartovať videá</string>
|
||||
<string name="animate_gifs">Animovať gif súbory pri náhľade</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Bola pridaná možnosť vlastného zoradenia jednotlivých priečinkov</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Endast videos</string>
|
||||
<string name="images_and_videos">Bilder och videos</string>
|
||||
<string name="loop_videos">Återspela videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Yalnızca videolar</string>
|
||||
<string name="images_and_videos">Resimler ve videolar</string>
|
||||
<string name="loop_videos">Videolar döngüsü</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">仅视频</string>
|
||||
<string name="images_and_videos">图像和视频</string>
|
||||
<string name="loop_videos">循环播放视频</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">僅影片</string>
|
||||
<string name="images_and_videos">圖片和影片</string>
|
||||
<string name="loop_videos">迴圈播放影片</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<string name="videos">Videos only</string>
|
||||
<string name="images_and_videos">Images and videos</string>
|
||||
<string name="loop_videos">Loop videos</string>
|
||||
<string name="animate_gifs">Animate gifs at thumbnails</string>
|
||||
|
||||
<!-- Release notes -->
|
||||
<string name="release_74">Allow setting different sorting per folder</string>
|
||||
|
|
Loading…
Reference in a new issue