diff --git a/app/build.gradle b/app/build.gradle index 40a431b1..eeb162d8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.2.10' + implementation 'com.simplemobiletools:commons:5.3.9' implementation files('../libs/RootTools.jar') } 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 1fda7ada..93653f4e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/SettingsActivity.kt @@ -22,13 +22,12 @@ class SettingsActivity : SimpleActivity() { override fun onResume() { super.onResume() - setupPurchaseThankYou() + setupUpgradeToPro() setupCustomizeColors() setupUseEnglish() - setupAvoidWhatsNew() setupManageFavorites() setupShowHidden() - setupPasswordProtection() + setupHiddenItemPasswordProtection() setupKeepLastModified() setupShowInfoBubble() setupEnableRootAccess() @@ -43,10 +42,10 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupPurchaseThankYou() { - settings_purchase_thank_you_holder.beVisibleIf(config.appRunCount > 10 && !isThankYouInstalled()) - settings_purchase_thank_you_holder.setOnClickListener { - launchPurchaseThankYouIntent() + private fun setupUpgradeToPro() { + settings_upgrade_to_pro_holder.beGoneIf(isAProApp()) + settings_upgrade_to_pro_holder.setOnClickListener { + launchUpgradeToProIntent() } } @@ -72,14 +71,6 @@ 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 { @@ -98,20 +89,20 @@ class SettingsActivity : SimpleActivity() { config.showHidden = settings_show_hidden.isChecked } - private fun setupPasswordProtection() { - settings_password_protection.isChecked = config.isPasswordProtectionOn + private fun setupHiddenItemPasswordProtection() { + settings_password_protection.isChecked = config.isHiddenPasswordProtectionOn settings_password_protection_holder.setOnClickListener { - val tabToShow = if (config.isPasswordProtectionOn) config.protectionType else SHOW_ALL_TABS - SecurityDialog(this, config.passwordHash, tabToShow) { hash, type, success -> + val tabToShow = if (config.isHiddenPasswordProtectionOn) config.hiddenProtectionType else SHOW_ALL_TABS + SecurityDialog(this, config.hiddenPasswordHash, tabToShow) { hash, type, success -> if (success) { - val hasPasswordProtection = config.isPasswordProtectionOn + val hasPasswordProtection = config.isHiddenPasswordProtectionOn settings_password_protection.isChecked = !hasPasswordProtection - config.isPasswordProtectionOn = !hasPasswordProtection - config.passwordHash = if (hasPasswordProtection) "" else hash - config.protectionType = type + config.isHiddenPasswordProtectionOn = !hasPasswordProtection + config.hiddenPasswordHash = if (hasPasswordProtection) "" else hash + config.hiddenProtectionType = type - if (config.isPasswordProtectionOn) { - val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT) + if (config.isHiddenPasswordProtectionOn) { + val confirmationTextId = if (config.hiddenProtectionType == PROTECTION_FINGERPRINT) R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { } } diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 0b945e99..2e631a62 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -13,24 +13,24 @@ android:orientation="vertical"> + android:paddingBottom="@dimen/activity_margin"> + android:paddingLeft="@dimen/medium_margin" + android:text="@string/upgrade_to_pro"/> @@ -40,18 +40,18 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> @@ -62,18 +62,18 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> @@ -84,10 +84,10 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> - - - - - - + android:paddingBottom="@dimen/activity_margin"> @@ -179,8 +155,8 @@ android:id="@+id/file_operations_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginStart="@dimen/bigger_margin" + android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginTop="@dimen/activity_margin" android:text="@string/file_operations" android:textAllCaps="true" @@ -192,10 +168,10 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> @@ -221,8 +197,8 @@ android:id="@+id/scrolling_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginStart="@dimen/bigger_margin" + android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginTop="@dimen/activity_margin" android:text="@string/scrolling" android:textAllCaps="true" @@ -234,10 +210,10 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> @@ -263,8 +239,8 @@ android:id="@+id/security_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginStart="@dimen/bigger_margin" + android:layout_marginLeft="@dimen/bigger_margin" android:layout_marginTop="@dimen/activity_margin" android:text="@string/security" android:textAllCaps="true" @@ -276,10 +252,10 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> @@ -300,10 +276,10 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingBottom="@dimen/activity_margin" android:paddingLeft="@dimen/normal_margin" + android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/normal_margin" - android:paddingTop="@dimen/activity_margin"> + android:paddingBottom="@dimen/activity_margin"> diff --git a/build.gradle b/build.gradle index 0b0dbc07..17a20ee3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.71' + ext.kotlin_version = '1.3.0' repositories { google()