From 74c5d89ed106c384d3a17f3188cc1fe5682dde11 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 11 Jul 2018 11:13:47 +0200 Subject: [PATCH] adding a Purchase Thank You settings button --- .../activities/SettingsActivity.kt | 13 +++++++---- app/src/main/res/layout/activity_settings.xml | 22 +++++++++++++++++++ 2 files changed, 31 insertions(+), 4 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 98e2ff14..adf236f6 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.getAdjustedPrimaryColor -import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection -import com.simplemobiletools.commons.extensions.updateTextColors +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 @@ -25,6 +22,7 @@ class SettingsActivity : SimpleActivity() { override fun onResume() { super.onResume() + setupPurchaseThankYou() setupCustomizeColors() setupUseEnglish() setupAvoidWhatsNew() @@ -45,6 +43,13 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupPurchaseThankYou() { + settings_purchase_thank_you_holder.beVisibleIf(!isThankYouInstalled()) + settings_purchase_thank_you_holder.setOnClickListener { + launchPurchaseThankYouIntent() + } + } + private fun setupCustomizeColors() { settings_customize_colors_holder.setOnClickListener { startCustomizationActivity() diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 966c2515..e2f9cdd8 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -11,6 +11,28 @@ android:layout_height="wrap_content" android:orientation="vertical"> + + + + + +