diff --git a/app/build.gradle b/app/build.gradle index 255f005b..a5af4d00 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.22.19' + implementation 'com.simplemobiletools:commons:5.22.20' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt index 30095a86..120dd3ee 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SettingsActivity.kt @@ -5,13 +5,11 @@ import android.os.Bundle import android.view.Menu import com.simplemobiletools.commons.dialogs.ChangeDateTimeFormatDialog 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.getAdjustedPrimaryColor -import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection -import com.simplemobiletools.commons.extensions.updateTextColors -import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT -import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS +import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.* +import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.filemanager.pro.R import com.simplemobiletools.filemanager.pro.extensions.config import com.simplemobiletools.filemanager.pro.helpers.RootHelpers @@ -31,6 +29,7 @@ class SettingsActivity : SimpleActivity() { setupUseEnglish() setupManageFavorites() setupChangeDateTimeFormat() + setupFontSize() setupShowHidden() setupHiddenItemPasswordProtection() setupAppPasswordProtection() @@ -83,6 +82,22 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupFontSize() { + settings_font_size.text = getFontSizeText() + settings_font_size_holder.setOnClickListener { + val items = arrayListOf( + RadioItem(FONT_SIZE_SMALL, getString(R.string.small)), + RadioItem(FONT_SIZE_MEDIUM, getString(R.string.medium)), + RadioItem(FONT_SIZE_LARGE, getString(R.string.large)), + RadioItem(FONT_SIZE_EXTRA_LARGE, getString(R.string.extra_large))) + + RadioGroupDialog(this@SettingsActivity, items, config.fontSize) { + config.fontSize = it as Int + settings_font_size.text = getFontSizeText() + } + } + } + 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 4465dda5..b5e5e21c 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -99,6 +99,38 @@ + + + + + + + +