mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 04:28:00 +01:00
move option animate gifs to main settings
This commit is contained in:
parent
669bfcd904
commit
d203c1fced
4 changed files with 24 additions and 19 deletions
|
@ -66,6 +66,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupOpenVideosOnSeparateScreen()
|
||||
setupMaxBrightness()
|
||||
setupCropThumbnails()
|
||||
setupAnimateGifs()
|
||||
setupDarkBackground()
|
||||
setupScrollHorizontally()
|
||||
setupScreenRotation()
|
||||
|
@ -310,6 +311,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupAnimateGifs() {
|
||||
binding.settingsAnimateGifs.isChecked = config.animateGifs
|
||||
binding.settingsAnimateGifsHolder.setOnClickListener {
|
||||
binding.settingsAnimateGifs.toggle()
|
||||
config.animateGifs = binding.settingsAnimateGifs.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupDarkBackground() {
|
||||
binding.settingsBlackBackground.isChecked = config.blackBackground
|
||||
binding.settingsBlackBackgroundHolder.setOnClickListener {
|
||||
|
|
|
@ -17,13 +17,11 @@ class ChangeFileThumbnailStyleDialog(val activity: BaseSimpleActivity) : DialogI
|
|||
init {
|
||||
binding = DialogChangeFileThumbnailStyleBinding.inflate(activity.layoutInflater).apply {
|
||||
dialogFileStyleRoundedCorners.isChecked = config.fileRoundedCorners
|
||||
dialogFileStyleAnimateGifs.isChecked = config.animateGifs
|
||||
dialogFileStyleShowThumbnailVideoDuration.isChecked = config.showThumbnailVideoDuration
|
||||
dialogFileStyleShowThumbnailFileTypes.isChecked = config.showThumbnailFileTypes
|
||||
dialogFileStyleMarkFavoriteItems.isChecked = config.markFavoriteItems
|
||||
|
||||
dialogFileStyleRoundedCornersHolder.setOnClickListener { dialogFileStyleRoundedCorners.toggle() }
|
||||
dialogFileStyleAnimateGifsHolder.setOnClickListener { dialogFileStyleAnimateGifs.toggle() }
|
||||
dialogFileStyleShowThumbnailVideoDurationHolder.setOnClickListener { dialogFileStyleShowThumbnailVideoDuration.toggle() }
|
||||
dialogFileStyleShowThumbnailFileTypesHolder.setOnClickListener { dialogFileStyleShowThumbnailFileTypes.toggle() }
|
||||
dialogFileStyleMarkFavoriteItemsHolder.setOnClickListener { dialogFileStyleMarkFavoriteItems.toggle() }
|
||||
|
@ -59,7 +57,6 @@ class ChangeFileThumbnailStyleDialog(val activity: BaseSimpleActivity) : DialogI
|
|||
|
||||
override fun onClick(dialog: DialogInterface, which: Int) {
|
||||
config.fileRoundedCorners = binding.dialogFileStyleRoundedCorners.isChecked
|
||||
config.animateGifs = binding.dialogFileStyleAnimateGifs.isChecked
|
||||
config.showThumbnailVideoDuration = binding.dialogFileStyleShowThumbnailVideoDuration.isChecked
|
||||
config.showThumbnailFileTypes = binding.dialogFileStyleShowThumbnailFileTypes.isChecked
|
||||
config.markFavoriteItems = binding.dialogFileStyleMarkFavoriteItems.isChecked
|
||||
|
|
|
@ -326,6 +326,21 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_animate_gifs_holder"
|
||||
style="@style/SettingsHolderCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/settings_animate_gifs"
|
||||
style="@style/SettingsCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/animate_gifs" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_file_thumbnail_style_holder"
|
||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||
|
|
|
@ -61,22 +61,6 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialog_file_style_animate_gifs_holder"
|
||||
style="@style/SettingsHolderCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/dialog_file_style_animate_gifs"
|
||||
style="@style/SettingsCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/animate_gifs" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialog_file_style_show_thumbnail_video_duration_holder"
|
||||
style="@style/SettingsHolderCheckboxStyle"
|
||||
|
|
Loading…
Reference in a new issue