require Simple Thank You for using widgets
This commit is contained in:
parent
aa953babfd
commit
fa37a78156
|
@ -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>
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue