require Simple Thank You purchase for color customization

This commit is contained in:
tibbi 2020-12-29 17:18:06 +01:00
parent dc4142e54b
commit 3aa4a8dab6
4 changed files with 13 additions and 15 deletions

View File

@ -55,7 +55,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.31.25'
implementation 'com.simplemobiletools:commons:5.32.16'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
}

View File

@ -3,10 +3,7 @@ package com.simplemobiletools.flashlight.activities
import android.content.Intent
import android.os.Bundle
import android.view.Menu
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.helpers.IS_CUSTOMIZING_COLORS
import com.simplemobiletools.flashlight.R
import com.simplemobiletools.flashlight.extensions.config
@ -40,16 +37,17 @@ class SettingsActivity : SimpleActivity() {
return super.onCreateOptionsMenu(menu)
}
private fun setupCustomizeColors() {
settings_customize_colors_holder.setOnClickListener {
startCustomizationActivity()
private fun setupPurchaseThankYou() {
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
settings_purchase_thank_you_holder.setOnClickListener {
launchPurchaseThankYouIntent()
}
}
private fun setupPurchaseThankYou() {
settings_purchase_thank_you_holder.beVisibleIf(!isThankYouInstalled())
settings_purchase_thank_you_holder.setOnClickListener {
launchPurchaseThankYouIntent()
private fun setupCustomizeColors() {
settings_customize_colors_label.text = getCustomizeColorsString()
settings_customize_colors_holder.setOnClickListener {
handleCustomizeColorsClick()
}
}

View File

@ -44,7 +44,7 @@
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_colors"
android:id="@+id/settings_customize_colors_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"

View File

@ -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.4.10'
ext.kotlin_version = '1.4.21'
repositories {
google()
@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong