require Simple Thank You for using widgets

This commit is contained in:
tibbi 2022-05-20 21:57:56 +02:00
parent aa953babfd
commit fa37a78156
2 changed files with 21 additions and 0 deletions

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="show_donate_in_about">true</bool>
<bool name="hide_google_relations">true</bool>
<bool name="pretend_thank_you_installed">true</bool>
</resources>

View File

@ -7,6 +7,7 @@ import android.graphics.Color
import android.os.Bundle
import android.widget.SeekBar
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.dialogs.WidgetLockedDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
import com.simplemobiletools.voicerecorder.R
@ -19,6 +20,7 @@ class WidgetRecordDisplayConfigureActivity : SimpleActivity() {
private var mWidgetId = 0
private var mWidgetColor = 0
private var mWidgetColorWithoutTransparency = 0
private var mWidgetLockedDialog: WidgetLockedDialog? = null
public override fun onCreate(savedInstanceState: Bundle?) {
useDynamicTheme = false
@ -39,6 +41,23 @@ class WidgetRecordDisplayConfigureActivity : SimpleActivity() {
val primaryColor = getProperPrimaryColor()
config_widget_seekbar.setColors(getProperTextColor(), primaryColor, primaryColor)
if (!isCustomizingColors && !isOrWasThankYouInstalled()) {
mWidgetLockedDialog = WidgetLockedDialog(this) {
if (!isOrWasThankYouInstalled()) {
finish()
}
}
}
}
override fun onResume() {
super.onResume()
window.decorView.setBackgroundColor(0)
if (mWidgetLockedDialog != null && isOrWasThankYouInstalled()) {
mWidgetLockedDialog?.dismissDialog()
}
}
private fun initVariables() {