From 0b147caf80ae7310c1c7a21c8fd2f3d3a5e19ac4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 12 Feb 2018 18:29:15 +0100 Subject: [PATCH] add a toggle in Settings to avoid showing Whats new --- .../activities/SettingsActivity.kt | 9 ++++++++ app/src/main/res/layout/activity_settings.xml | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt index 413be939..b6a2d61d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt @@ -24,6 +24,7 @@ class SettingsActivity : SimpleActivity() { setupCustomizeColors() setupUseEnglish() + setupAvoidWhatsNew() setupManageFavorites() setupShowHidden() setupPasswordProtection() @@ -63,6 +64,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupAvoidWhatsNew() { + settings_avoid_whats_new.isChecked = config.avoidWhatsNew + settings_avoid_whats_new_holder.setOnClickListener { + settings_avoid_whats_new.toggle() + config.avoidWhatsNew = settings_avoid_whats_new.isChecked + } + } + private fun setupShowHidden() { settings_show_hidden.isChecked = config.showHidden settings_show_hidden_holder.setOnClickListener { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 904f9dc3..6a267207 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -69,6 +69,29 @@ + + + + + +