replace the Purchase Thank You button with Upgrade To Pro
This commit is contained in:
parent
80332daa37
commit
6efaa5a1b4
4 changed files with 16 additions and 13 deletions
|
@ -41,7 +41,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.3.10'
|
||||
implementation 'com.simplemobiletools:commons:5.3.11'
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.appcompat.widget.SearchView
|
|||
import androidx.core.view.MenuItemCompat
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||
import com.simplemobiletools.commons.dialogs.UpgradeToProDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.FAQItem
|
||||
|
@ -74,6 +75,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
|
||||
storeStateVariables()
|
||||
checkWhatsNewDialog()
|
||||
|
||||
if (!config.wasInitialUpgradeToProShown) {
|
||||
UpgradeToProDialog(this)
|
||||
config.wasInitialUpgradeToProShown = true
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkContactPermissions() {
|
||||
|
|
|
@ -2,10 +2,7 @@ package com.simplemobiletools.contacts.activities
|
|||
|
||||
import android.os.Bundle
|
||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.isThankYouInstalled
|
||||
import com.simplemobiletools.commons.extensions.launchPurchaseThankYouIntent
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.contacts.R
|
||||
import com.simplemobiletools.contacts.dialogs.ManageVisibleFieldsDialog
|
||||
|
@ -26,7 +23,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
setupPurchaseThankYou()
|
||||
setupUpgradeToPro()
|
||||
setupCustomizeColors()
|
||||
setupManageShownContactFields()
|
||||
setupManageShownTabs()
|
||||
|
@ -43,10 +40,10 @@ class SettingsActivity : SimpleActivity() {
|
|||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_purchase_thank_you_holder"
|
||||
android:id="@+id/settings_upgrade_to_pro_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
|
@ -24,13 +24,13 @@
|
|||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/settings_purchase_thank_you"
|
||||
android:id="@+id/settings_upgrade_to_pro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:text="@string/purchase_simple_thank_you"/>
|
||||
android:text="@string/upgrade_to_pro"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
Loading…
Reference in a new issue