add some repetition limit related views
This commit is contained in:
parent
9afe5dc7ae
commit
e34efa0db5
|
@ -69,6 +69,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
event_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) }
|
||||
event_reminder.setOnClickListener { showReminderDialog() }
|
||||
event_repetition.setOnClickListener { showRepeatIntervalDialog() }
|
||||
event_repetition_limit.setOnClickListener { showRepetitionLimitDialog() }
|
||||
|
||||
if (mEvent.flags and FLAG_ALL_DAY != 0)
|
||||
event_all_day.toggle()
|
||||
|
@ -106,9 +107,15 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
EventRepeatIntervalDialog(this, mRepeatInterval) {
|
||||
mRepeatInterval = it
|
||||
updateRepetitionText()
|
||||
event_repetition_limit.beGoneIf(it == 0)
|
||||
event_repetition_limit_label.beGoneIf(it == 0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showRepetitionLimitDialog() {
|
||||
|
||||
}
|
||||
|
||||
private fun updateReminderText() {
|
||||
event_reminder.text = getReminderText(mReminderMinutes)
|
||||
}
|
||||
|
|
|
@ -208,5 +208,33 @@
|
|||
android:paddingTop="@dimen/normal_margin"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/event_repetition_limit_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/event_repetition"
|
||||
android:layout_alignStart="@+id/event_repetition"
|
||||
android:layout_below="@+id/event_repetition"
|
||||
android:layout_toLeftOf="@+id/event_repetition_limit"
|
||||
android:layout_toStartOf="@+id/event_repetition_limit"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/repeat_till"
|
||||
android:textSize="@dimen/day_text_size"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/event_repetition_limit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/event_repetition"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:text="@string/forever"
|
||||
android:textSize="@dimen/day_text_size"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in New Issue