From 52ddc8ce598e681bf058320cbaa6f140baf2489c Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 14 Apr 2017 14:28:16 +0200 Subject: [PATCH] show a repeat rule field if repetition is set to a day or month --- .../calendar/activities/EventActivity.kt | 7 ++++ app/src/main/res/layout/activity_event.xml | 36 ++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt index 1c8d187ac..0b8d361bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -77,6 +77,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { event_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) } event_repetition.setOnClickListener { showRepeatIntervalDialog() } event_repetition_limit_holder.setOnClickListener { showRepetitionLimitDialog() } + event_repetition_rule_holder.setOnClickListener { showRepetitionRuleDialog() } event_reminder_1.setOnClickListener { showReminder1Dialog() } event_reminder_2.setOnClickListener { showReminder2Dialog() } @@ -148,6 +149,8 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { private fun checkRepeatLimit(limit: Int) { event_repetition_limit_holder.beGoneIf(limit == 0) checkRepetitionLimitText() + + event_repetition_rule_holder.beGoneIf(mRepeatInterval != DAY && mRepeatInterval != MONTH) } private fun showRepetitionLimitDialog() { @@ -176,6 +179,10 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener { } } + private fun showRepetitionRuleDialog() { + + } + private fun showEventTypeDialog() { SelectEventTypeDialog(this, mEventTypeId) { mEventTypeId = it diff --git a/app/src/main/res/layout/activity_event.xml b/app/src/main/res/layout/activity_event.xml index 1eac99879..915913bb3 100644 --- a/app/src/main/res/layout/activity_event.xml +++ b/app/src/main/res/layout/activity_event.xml @@ -240,7 +240,7 @@ android:textSize="@dimen/day_text_size"/> + + + + + + +