add a button for all day events
This commit is contained in:
parent
6547c3b4bb
commit
de6a7cb8e6
14 changed files with 33 additions and 1 deletions
|
@ -69,6 +69,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
event_end_time.setOnClickListener { setupEndTime() }
|
||||
|
||||
event_end_checkbox.setOnCheckedChangeListener { compoundButton, isChecked -> endCheckboxChecked(isChecked) }
|
||||
event_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) }
|
||||
|
||||
event_reminder.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onNothingSelected(p0: AdapterView<*>?) {
|
||||
|
@ -78,6 +79,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
reminderItemSelected()
|
||||
}
|
||||
}
|
||||
|
||||
updateTextColors(event_scrollview)
|
||||
}
|
||||
|
||||
|
@ -155,6 +157,10 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
)
|
||||
}
|
||||
|
||||
fun toggleAllDay(isChecked: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
fun endCheckboxChecked(isChecked: Boolean) {
|
||||
hideKeyboard()
|
||||
event_end_date.beVisibleIf(isChecked)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/event_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
@ -59,6 +60,19 @@
|
|||
android:text="@string/start"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/event_all_day"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/event_description"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:text="@string/all_day"
|
||||
android:textSize="@dimen/day_text_size"
|
||||
app:switchPadding="@dimen/small_margin"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/event_start_date"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Start</string>
|
||||
<string name="end">Ende (optional)</string>
|
||||
<string name="description">Beschreibung</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Woche</string>
|
||||
|
|
|
@ -52,10 +52,11 @@
|
|||
<string name="invalid_file_format">Invalid file format</string>
|
||||
|
||||
<!-- Event details -->
|
||||
<string name="title">Título</string>
|
||||
<string name="title">Título</string>
|
||||
<string name="start">Inicio</string>
|
||||
<string name="end">Fin (opcional)</string>
|
||||
<string name="description">Descripción</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Début</string>
|
||||
<string name="end">Fin (optionnel)</string>
|
||||
<string name="description">Description</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">प्रारंभ</string>
|
||||
<string name="end">अंत (वैकल्पिक)</string>
|
||||
<string name="description">विवरण</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Kezdet</string>
|
||||
<string name="end">Vég (nem kötelező)</string>
|
||||
<string name="description">Leírás</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Inizio</string>
|
||||
<string name="end">Fine (facoltativo)</string>
|
||||
<string name="description">Descrizione</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">התחלה</string>
|
||||
<string name="end">סוף (אופציונלי)</string>
|
||||
<string name="description">תיאור</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">שבוע</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">開始</string>
|
||||
<string name="end">終了 (任意)</string>
|
||||
<string name="description">説明</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Início</string>
|
||||
<string name="end">Fim (opcional)</string>
|
||||
<string name="description">Descrição</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Semana</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Начало</string>
|
||||
<string name="end">Окончание (необязательно)</string>
|
||||
<string name="description">Описание</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Неделя</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Start</string>
|
||||
<string name="end">Slut (frivillig)</string>
|
||||
<string name="description">Beskrivning</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Vecka</string>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<string name="start">Start</string>
|
||||
<string name="end">End (optional)</string>
|
||||
<string name="description">Description</string>
|
||||
<string name="all_day">All-day</string>
|
||||
|
||||
<!-- Weekly view -->
|
||||
<string name="week">Week</string>
|
||||
|
|
Loading…
Reference in a new issue