remove some code repetition
This commit is contained in:
parent
98e1508a88
commit
1337340896
|
@ -138,14 +138,16 @@ class EventActivity : SimpleActivity(), DBHelper.EventsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupRepetition() {
|
private fun setupRepetition() {
|
||||||
|
event_repetition.setSelection(
|
||||||
when (mEvent.repeatInterval) {
|
when (mEvent.repeatInterval) {
|
||||||
DAY -> event_repetition.setSelection(1)
|
DAY -> 1
|
||||||
WEEK -> event_repetition.setSelection(2)
|
WEEK -> 2
|
||||||
BIWEEK -> event_repetition.setSelection(3)
|
BIWEEK -> 3
|
||||||
MONTH -> event_repetition.setSelection(4)
|
MONTH -> 4
|
||||||
YEAR -> event_repetition.setSelection(5)
|
YEAR -> 5
|
||||||
else -> event_repetition.setSelection(0)
|
else -> 0
|
||||||
}
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupEndCheckbox() {
|
private fun setupEndCheckbox() {
|
||||||
|
|
Loading…
Reference in New Issue