shorten some widget config color picker dialog code

This commit is contained in:
tibbi 2017-01-04 00:00:20 +01:00
parent 2fadc6564c
commit 3e443fbf90
1 changed files with 4 additions and 8 deletions

View File

@ -100,7 +100,7 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
}
fun pickBackgroundColor() {
val dialog = AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener {
AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener {
override fun onCancel(dialog: AmbilWarnaDialog) {
}
@ -108,13 +108,11 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
mBgColorWithoutTransparency = color
updateBgColor()
}
})
dialog.show()
}).show()
}
fun pickTextColor() {
val dialog = AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener {
AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener {
override fun onCancel(dialog: AmbilWarnaDialog) {
}
@ -123,9 +121,7 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
updateTextColors()
updateDays()
}
})
dialog.show()
}).show()
}
private fun requestWidgetUpdate() {