@@ -9,12 +9,12 @@ import android.support.v7.app.AppCompatActivity
99import android.util.TypedValue
1010import android.widget.RemoteViews
1111import android.widget.SeekBar
12+ import com.simplemobiletools.commons.dialogs.ColorPickerDialog
1213import com.simplemobiletools.notes.R
1314import com.simplemobiletools.notes.extensions.getTextSize
1415import com.simplemobiletools.notes.helpers.Config
1516import com.simplemobiletools.notes.helpers.MyWidgetProvider
1617import kotlinx.android.synthetic.main.widget_config.*
17- import yuku.ambilwarna.AmbilWarnaDialog
1818
1919class WidgetConfigureActivity : AppCompatActivity () {
2020 private var mBgAlpha = 0f
@@ -110,27 +110,17 @@ class WidgetConfigureActivity : AppCompatActivity() {
110110 }
111111
112112 fun pickBackgroundColor () {
113- AmbilWarnaDialog (this , mBgColorWithoutTransparency, object : AmbilWarnaDialog .OnAmbilWarnaListener {
114- override fun onCancel (dialog : AmbilWarnaDialog ) {
115- }
116-
117- override fun onOk (dialog : AmbilWarnaDialog , color : Int ) {
118- mBgColorWithoutTransparency = color
119- updateBackgroundColor()
120- }
121- }).show()
113+ ColorPickerDialog (this , mBgColorWithoutTransparency) {
114+ mBgColorWithoutTransparency = it
115+ updateBackgroundColor()
116+ }
122117 }
123118
124119 fun pickTextColor () {
125- AmbilWarnaDialog (this , mTextColor, object : AmbilWarnaDialog .OnAmbilWarnaListener {
126- override fun onCancel (dialog : AmbilWarnaDialog ) {
127- }
128-
129- override fun onOk (dialog : AmbilWarnaDialog , color : Int ) {
130- mTextColor = color
131- updateTextColor()
132- }
133- }).show()
120+ ColorPickerDialog (this , mTextColor) {
121+ mTextColor = it
122+ updateTextColor()
123+ }
134124 }
135125
136126 private val bgSeekbarChangeListener = object : SeekBar .OnSeekBarChangeListener {
0 commit comments