From 246c0a04537b9ee0d42b7dc8264897e7a5673f3b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 27 Jan 2018 22:48:00 +0100 Subject: [PATCH] split Settings into subsections --- .../gallery/activities/SettingsActivity.kt | 13 +- app/src/main/res/layout/activity_settings.xml | 492 +++++++++++------- 2 files changed, 318 insertions(+), 187 deletions(-) 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 ad9dc2043..d35769e5e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -6,10 +6,7 @@ import android.os.Bundle import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.SecurityDialog -import com.simplemobiletools.commons.extensions.beVisibleIf -import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection -import com.simplemobiletools.commons.extensions.updateTextColors -import com.simplemobiletools.commons.extensions.useEnglishToggled +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS import com.simplemobiletools.commons.models.RadioItem @@ -61,6 +58,14 @@ class SettingsActivity : SimpleActivity() { setupShowExtendedDetails() setupManageExtendedDetails() updateTextColors(settings_holder) + setupSectionColors() + } + + private fun setupSectionColors() { + val adjustedPrimaryColor = getAdjustedPrimaryColor() + arrayListOf(visibility_label, videos_label, thumbnails_label, scrolling_label, fullscreen_media_label, security_label, file_operations_label).forEach { + it.setTextColor(adjustedPrimaryColor) + } } private fun setupCustomizeColors() { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 9dfdfacac..085907c47 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -30,6 +30,44 @@ + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - + android:text="@string/show_media_count"/> + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +