mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
adding a new slideshow option, moving backwards
This commit is contained in:
parent
86a5107cc6
commit
e3a5b9356e
21 changed files with 49 additions and 0 deletions
|
@ -36,6 +36,10 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
||||||
use_fade_holder.setOnClickListener {
|
use_fade_holder.setOnClickListener {
|
||||||
use_fade.toggle()
|
use_fade.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
move_backwards_holder.setOnClickListener {
|
||||||
|
move_backwards.toggle()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setupValues()
|
setupValues()
|
||||||
|
|
||||||
|
@ -55,6 +59,7 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
||||||
include_videos.isChecked = config.slideshowIncludeVideos
|
include_videos.isChecked = config.slideshowIncludeVideos
|
||||||
random_order.isChecked = config.slideshowRandomOrder
|
random_order.isChecked = config.slideshowRandomOrder
|
||||||
use_fade.isChecked = config.slideshowUseFade
|
use_fade.isChecked = config.slideshowUseFade
|
||||||
|
move_backwards.isChecked = config.slideshowMoveBackwards
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +73,7 @@ class SlideshowDialog(val activity: SimpleActivity, val callback: () -> Unit) {
|
||||||
slideshowIncludeVideos = view.include_videos.isChecked
|
slideshowIncludeVideos = view.include_videos.isChecked
|
||||||
slideshowRandomOrder = view.random_order.isChecked
|
slideshowRandomOrder = view.random_order.isChecked
|
||||||
slideshowUseFade = view.use_fade.isChecked
|
slideshowUseFade = view.use_fade.isChecked
|
||||||
|
slideshowMoveBackwards = view.move_backwards.isChecked
|
||||||
}
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
callback()
|
callback()
|
||||||
|
|
|
@ -248,4 +248,8 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
var slideshowUseFade: Boolean
|
var slideshowUseFade: Boolean
|
||||||
get() = prefs.getBoolean(SLIDESHOW_USE_FADE, false)
|
get() = prefs.getBoolean(SLIDESHOW_USE_FADE, false)
|
||||||
set(slideshowUseFade) = prefs.edit().putBoolean(SLIDESHOW_USE_FADE, slideshowUseFade).apply()
|
set(slideshowUseFade) = prefs.edit().putBoolean(SLIDESHOW_USE_FADE, slideshowUseFade).apply()
|
||||||
|
|
||||||
|
var slideshowMoveBackwards: Boolean
|
||||||
|
get() = prefs.getBoolean(SLIDESHOW_MOVE_BACKWARDS, false)
|
||||||
|
set(slideshowMoveBackwards) = prefs.edit().putBoolean(SLIDESHOW_MOVE_BACKWARDS, slideshowMoveBackwards).apply()
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ val SLIDESHOW_INTERVAL = "slideshow_interval"
|
||||||
val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos"
|
val SLIDESHOW_INCLUDE_VIDEOS = "slideshow_include_videos"
|
||||||
val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order"
|
val SLIDESHOW_RANDOM_ORDER = "slideshow_random_order"
|
||||||
val SLIDESHOW_USE_FADE = "slideshow_use_fade"
|
val SLIDESHOW_USE_FADE = "slideshow_use_fade"
|
||||||
|
val SLIDESHOW_MOVE_BACKWARDS = "slideshow_move_backwards"
|
||||||
val SLIDESHOW_DEFAULT_INTERVAL = 5
|
val SLIDESHOW_DEFAULT_INTERVAL = 5
|
||||||
|
|
||||||
val NOMEDIA = ".nomedia"
|
val NOMEDIA = ".nomedia"
|
||||||
|
|
|
@ -99,5 +99,26 @@
|
||||||
android:text="@string/use_fade"/>
|
android:text="@string/use_fade"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/move_backwards_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/use_fade_holder"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:paddingBottom="@dimen/activity_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
|
android:id="@+id/move_backwards"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:text="@string/move_backwards"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Zobrazit skryté média</string>
|
<string name="show_hidden_media">Zobrazit skryté média</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Versteckte Ordner zeigen</string>
|
<string name="show_hidden_media">Versteckte Ordner zeigen</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostrar carpetas ocultas</string>
|
<string name="show_hidden_media">Mostrar carpetas ocultas</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Afficher les dossiers cachés</string>
|
<string name="show_hidden_media">Afficher les dossiers cachés</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Show hidden media</string>
|
<string name="show_hidden_media">Show hidden media</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostra cartelle nascoste</string>
|
<string name="show_hidden_media">Mostra cartelle nascoste</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">非表示フォルダーを表示</string>
|
<string name="show_hidden_media">非表示フォルダーを表示</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Pokazuj ukryte foldery</string>
|
<string name="show_hidden_media">Pokazuj ukryte foldery</string>
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
<string name="show_hidden_media">Mostrar pastas ocultas</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Показать скрытые папки</string>
|
<string name="show_hidden_media">Показать скрытые папки</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Zahrnúť videá</string>
|
<string name="include_videos">Zahrnúť videá</string>
|
||||||
<string name="random_order">Náhodné poradie</string>
|
<string name="random_order">Náhodné poradie</string>
|
||||||
<string name="use_fade">Používať miznúce animácie</string>
|
<string name="use_fade">Používať miznúce animácie</string>
|
||||||
|
<string name="move_backwards">Ísť opačným smerom</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Zobraziť skryté médiá</string>
|
<string name="show_hidden_media">Zobraziť skryté médiá</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Visa dolda mappar</string>
|
<string name="show_hidden_media">Visa dolda mappar</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Gizli klasörleri göster</string>
|
<string name="show_hidden_media">Gizli klasörleri göster</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">显示所有</string>
|
<string name="show_hidden_media">显示所有</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">秀出隱藏資料夾</string>
|
<string name="show_hidden_media">秀出隱藏資料夾</string>
|
||||||
|
|
|
@ -85,6 +85,7 @@
|
||||||
<string name="include_videos">Include videos</string>
|
<string name="include_videos">Include videos</string>
|
||||||
<string name="random_order">Random order</string>
|
<string name="random_order">Random order</string>
|
||||||
<string name="use_fade">Use fade animations</string>
|
<string name="use_fade">Use fade animations</string>
|
||||||
|
<string name="move_backwards">Move backwards</string>
|
||||||
|
|
||||||
<!-- Settings -->
|
<!-- Settings -->
|
||||||
<string name="show_hidden_media">Show hidden media</string>
|
<string name="show_hidden_media">Show hidden media</string>
|
||||||
|
|
Loading…
Reference in a new issue