From 2734fe961596db12085c8af9303bb87e76189578 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 18 Jun 2017 21:16:40 +0200 Subject: [PATCH] add a toggle for scrolling thumbnails horizontally --- .../gallery/activities/SettingsActivity.kt | 9 +++++++++ app/src/main/res/layout/activity_settings.xml | 20 +++++++++++++++++++ 2 files changed, 29 insertions(+) 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 dfcb59d95..0d8720b55 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -33,6 +33,7 @@ class SettingsActivity : SimpleActivity() { setupMaxBrightness() setupCropThumbnails() setupDarkBackground() + setupScrollHorizontally() setupScreenRotation() setupShowMedia() updateTextColors(settings_holder) @@ -112,6 +113,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupScrollHorizontally() { + settings_scroll_horizontally.isChecked = config.scrollHorizontally + settings_scroll_horizontally_holder.setOnClickListener { + settings_scroll_horizontally.toggle() + config.scrollHorizontally = settings_scroll_horizontally.isChecked + } + } + private fun setupScreenRotation() { settings_screen_rotation.text = getScreenRotationText() settings_screen_rotation_holder.setOnClickListener { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index c1ec5d18a..94881326b 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -208,6 +208,26 @@ + + + + + +