mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-04-03 21:31:01 +02:00
take new color picker values into consideration only if OK was pressed
This commit is contained in:
parent
7b8b19cdce
commit
07894ef11b
@ -7,7 +7,6 @@ import android.graphics.Color
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.R.id.*
|
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
import com.simplemobiletools.clock.extensions.getFormattedDate
|
import com.simplemobiletools.clock.extensions.getFormattedDate
|
||||||
import com.simplemobiletools.clock.extensions.getFormattedTime
|
import com.simplemobiletools.clock.extensions.getFormattedTime
|
||||||
@ -105,15 +104,19 @@ class WidgetDateTimeConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun pickBackgroundColor() {
|
private fun pickBackgroundColor() {
|
||||||
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
||||||
mBgColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateBgColor()
|
mBgColorWithoutTransparency = color
|
||||||
|
updateBgColor()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickTextColor() {
|
private fun pickTextColor() {
|
||||||
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
||||||
mTextColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateColors()
|
mTextColorWithoutTransparency = color
|
||||||
|
updateColors()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user