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 4382254e6..4e17609c7 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
@@ -66,6 +66,7 @@ class SettingsActivity : SimpleActivity() {
setupKeepLastModified()
setupShowInfoBubble()
setupEnablePullToRefresh()
+ setupAllowZoomingImages()
setupOneFingerZoom()
setupAllowInstantChange()
setupShowExtendedDetails()
@@ -334,6 +335,16 @@ class SettingsActivity : SimpleActivity() {
}
}
+ private fun setupAllowZoomingImages() {
+ settings_one_finger_zoom_holder.beVisibleIf(config.allowZoomingImages)
+ settings_allow_zooming_images.isChecked = config.allowZoomingImages
+ settings_allow_zooming_images_holder.setOnClickListener {
+ settings_allow_zooming_images.toggle()
+ config.allowZoomingImages = settings_allow_zooming_images.isChecked
+ settings_one_finger_zoom_holder.beVisibleIf(config.allowZoomingImages)
+ }
+ }
+
private fun setupOneFingerZoom() {
settings_one_finger_zoom.isChecked = config.oneFingerZoom
settings_one_finger_zoom_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 7b2c2ec0c..ea722dd2b 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt
@@ -376,4 +376,8 @@ class Config(context: Context) : BaseConfig(context) {
var showRecycleBinAtFolders: Boolean
get() = prefs.getBoolean(SHOW_RECYCLE_BIN_AT_FOLDERS, true)
set(showRecycleBinAtFolders) = prefs.edit().putBoolean(SHOW_RECYCLE_BIN_AT_FOLDERS, showRecycleBinAtFolders).apply()
+
+ var allowZoomingImages: Boolean
+ get() = prefs.getBoolean(ALLOW_ZOOMING_IMAGES, true)
+ set(allowZoomingImages) = prefs.edit().putBoolean(ALLOW_ZOOMING_IMAGES, allowZoomingImages).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 afc60897d..035396202 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt
@@ -58,6 +58,7 @@ const val USE_RECYCLE_BIN = "use_recycle_bin"
const val GROUP_BY = "group_by"
const val EVER_SHOWN_FOLDERS = "ever_shown_folders"
const val SHOW_RECYCLE_BIN_AT_FOLDERS = "show_recycle_bin_at_folders"
+const val ALLOW_ZOOMING_IMAGES = "allow_zooming_images"
// slideshow
const val SLIDESHOW_INTERVAL = "slideshow_interval"
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index f837b0d95..b543aaa68 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -596,6 +596,30 @@
+
+
+
+
+
+