From 872bc17f3f4536f9670eea7c94fd25046aa2a0c6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 29 Jan 2018 15:28:45 +0100 Subject: [PATCH] add subsections to settings --- .../activities/SettingsActivity.kt | 13 ++- app/src/main/res/layout/activity_settings.xml | 106 +++++++++++++++--- 2 files changed, 98 insertions(+), 21 deletions(-) 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 5be50cb1..413be939 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt @@ -4,10 +4,7 @@ import android.content.Intent import android.os.Bundle import com.simplemobiletools.commons.dialogs.ConfirmationDialog 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.filemanager.R @@ -34,6 +31,14 @@ class SettingsActivity : SimpleActivity() { setupShowInfoBubble() setupEnableRootAccess() updateTextColors(settings_holder) + setupSectionColors() + } + + private fun setupSectionColors() { + val adjustedPrimaryColor = getAdjustedPrimaryColor() + arrayListOf(visibility_label, file_operations_label, scrolling_label, security_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 37345a08..904f9dc3 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -69,6 +69,24 @@ + + + + - + + - - - - + android:layout_marginLeft="@dimen/big_margin" + android:layout_marginStart="@dimen/big_margin" + android:layout_marginTop="@dimen/activity_margin" + android:text="@string/file_operations" + android:textAllCaps="true" + android:textSize="@dimen/smaller_text_size"/> + + + + + + + + + + + + + +