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 e50c30caf..d010bbc5e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -57,6 +57,7 @@ class SettingsActivity : SimpleActivity() { setupDeleteEmptyFolders() setupAllowPhotoGestures() setupAllowVideoGestures() + setupBottomActions() setupShowMediaCount() setupKeepLastModified() setupShowInfoBubble() @@ -295,6 +296,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupBottomActions() { + settings_bottom_actions.isChecked = config.bottomActions + settings_bottom_actions_holder.setOnClickListener { + settings_bottom_actions.toggle() + config.bottomActions = settings_bottom_actions.isChecked + } + } + private fun setupShowMediaCount() { settings_show_media_count.isChecked = config.showMediaCount settings_show_media_count_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 1b04f99c3..97e9e534e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -243,6 +243,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true) set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply() + var bottomActions: Boolean + get() = prefs.getBoolean(BOTTOM_ACTIONS, true) + set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply() + var showMediaCount: Boolean get() = prefs.getBoolean(SHOW_MEDIA_COUNT, true) set(showMediaCount) = prefs.edit().putBoolean(SHOW_MEDIA_COUNT, showMediaCount).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 ceab93a20..902a005c9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -49,6 +49,7 @@ const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock" const val LAST_FILEPICKER_PATH = "last_filepicker_path" const val WAS_OTG_HANDLED = "was_otg_handled" const val TEMP_SKIP_DELETE_CONFIRMATION = "temp_skip_delete_confirmation" +const val BOTTOM_ACTIONS = "bottom_actions" // 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 a41f8df5c..ef0dc36d2 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -672,6 +672,29 @@ + + + + + +