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 c963761b5..7860ec062 100644
--- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt
@@ -2,6 +2,7 @@ package com.simplemobiletools.calendar.activities
import android.app.DatePickerDialog
import android.app.TimePickerDialog
+import android.graphics.PorterDuff
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
@@ -68,7 +69,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
event_end_date.setOnClickListener { setupEndDate() }
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 {
@@ -81,6 +81,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
}
updateTextColors(event_scrollview)
+ updateIconColors()
}
private fun setupEditEvent() {
@@ -88,8 +89,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
title = resources.getString(R.string.edit_event)
mEventStartDateTime = Formatter.getDateTimeFromTS(mEvent.startTS)
mEventEndDateTime = Formatter.getDateTimeFromTS(mEvent.endTS)
- event_end_checkbox.isChecked = mEventStartDateTime != mEventEndDateTime
- endCheckboxChecked(event_end_checkbox.isChecked)
event_title.setText(mEvent.title)
event_description.setText(mEvent.description)
}
@@ -159,15 +158,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
fun toggleAllDay(isChecked: Boolean) {
event_start_time.beGoneIf(isChecked)
- event_end_checkbox.beGoneIf(isChecked)
- event_end_date.beGoneIf(isChecked || !event_end_checkbox.isChecked)
- event_end_time.beGoneIf(isChecked || !event_end_checkbox.isChecked)
- }
-
- fun endCheckboxChecked(isChecked: Boolean) {
- hideKeyboard()
- event_end_date.beVisibleIf(isChecked)
- event_end_time.beVisibleIf(isChecked)
+ event_end_time.beGoneIf(isChecked)
}
fun reminderItemSelected() {
@@ -241,7 +232,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
val newStartTS = mEventStartDateTime.seconds()
val newEndTS = mEventEndDateTime.seconds()
- if (event_end_checkbox.isChecked && newStartTS > newEndTS) {
+ if (newStartTS > newEndTS) {
toast(R.string.end_before_start)
return
}
@@ -250,7 +241,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
val newDescription = event_description.value
mEvent.apply {
startTS = newStartTS
- endTS = if (event_end_checkbox.isChecked) newEndTS else newStartTS
+ endTS = newEndTS
title = newTitle
description = newDescription
reminderMinutes = getReminderMinutes()
@@ -370,6 +361,12 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
}
}
+ private fun updateIconColors() {
+ event_time_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
+ event_repetition_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
+ event_reminder_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
+ }
+
override fun eventInserted(event: Event) {
if (DateTime.now().isAfter(mEventStartDateTime.millis)) {
toast(R.string.past_event_added)
diff --git a/app/src/main/res/drawable-hdpi/ic_bell.png b/app/src/main/res/drawable-hdpi/ic_bell.png
new file mode 100644
index 000000000..7e2f86f20
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_bell.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_clock.png b/app/src/main/res/drawable-hdpi/ic_clock.png
new file mode 100644
index 000000000..4651478fc
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_clock.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_repeat.png b/app/src/main/res/drawable-hdpi/ic_repeat.png
new file mode 100644
index 000000000..dc81e8535
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_repeat.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_bell.png b/app/src/main/res/drawable-mdpi/ic_bell.png
new file mode 100644
index 000000000..639a2339d
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_bell.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_clock.png b/app/src/main/res/drawable-mdpi/ic_clock.png
new file mode 100644
index 000000000..615a81de7
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_clock.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_repeat.png b/app/src/main/res/drawable-mdpi/ic_repeat.png
new file mode 100644
index 000000000..5b1542110
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_repeat.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_bell.png b/app/src/main/res/drawable-xhdpi/ic_bell.png
new file mode 100644
index 000000000..66df52290
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_bell.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_clock.png b/app/src/main/res/drawable-xhdpi/ic_clock.png
new file mode 100644
index 000000000..52cf597b0
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_clock.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_repeat.png b/app/src/main/res/drawable-xhdpi/ic_repeat.png
new file mode 100644
index 000000000..61d33ffbf
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_repeat.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_bell.png b/app/src/main/res/drawable-xxhdpi/ic_bell.png
new file mode 100644
index 000000000..75fb54865
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_bell.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_clock.png b/app/src/main/res/drawable-xxhdpi/ic_clock.png
new file mode 100644
index 000000000..cf9551f91
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_clock.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_repeat.png b/app/src/main/res/drawable-xxhdpi/ic_repeat.png
new file mode 100644
index 000000000..74eaa0c44
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_repeat.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_bell.png b/app/src/main/res/drawable-xxxhdpi/ic_bell.png
new file mode 100644
index 000000000..10f0c0523
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_bell.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_clock.png b/app/src/main/res/drawable-xxxhdpi/ic_clock.png
new file mode 100644
index 000000000..f156937ad
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_clock.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_repeat.png b/app/src/main/res/drawable-xxxhdpi/ic_repeat.png
new file mode 100644
index 000000000..f5beca251
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_repeat.png differ
diff --git a/app/src/main/res/layout/activity_event.xml b/app/src/main/res/layout/activity_event.xml
index 928a6eb2d..1dce0ee5f 100644
--- a/app/src/main/res/layout/activity_event.xml
+++ b/app/src/main/res/layout/activity_event.xml
@@ -9,21 +9,16 @@
-
-
+ android:layout_height="wrap_content">
-
-
-
+ android:background="#66808080"/>
+
+
@@ -77,8 +86,13 @@
android:id="@+id/event_start_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@+id/event_start_label"
- android:padding="@dimen/activity_margin"
+ android:layout_alignLeft="@+id/event_all_day"
+ android:layout_alignStart="@+id/event_all_day"
+ android:layout_below="@+id/event_time_image"
+ android:background="?attr/selectableItemBackground"
+ android:paddingBottom="@dimen/activity_margin"
+ android:paddingRight="@dimen/activity_margin"
+ android:paddingTop="@dimen/activity_margin"
android:text="January 1 1970"
android:textSize="@dimen/day_text_size"/>
@@ -86,69 +100,85 @@
android:id="@+id/event_start_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@+id/event_start_label"
- android:layout_toRightOf="@id/event_start_date"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_below="@+id/event_time_image"
+ android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:text="00:00"
android:textSize="@dimen/day_text_size"/>
-
-
+ android:textSize="@dimen/day_text_size"/>
-
-
+
+
+
+
+ android:padding="@dimen/normal_margin"/>
+
+
@@ -170,7 +200,8 @@
android:layout_height="match_parent"
android:entries="@array/custom_reminders"
android:gravity="center_vertical"
- android:paddingLeft="@dimen/activity_margin"/>
+ android:paddingLeft="@dimen/activity_margin"
+ android:paddingStart="@dimen/activity_margin"/>
-
+ android:layout_height="match_parent"
+ android:layout_alignBottom="@+id/event_repetition"
+ android:layout_alignTop="@+id/event_repetition"
+ android:layout_below="@+id/event_date_time_divider"
+ android:layout_marginLeft="@dimen/normal_margin"
+ android:layout_marginStart="@dimen/normal_margin"
+ android:alpha="0.8"
+ android:padding="@dimen/medium_margin"
+ android:src="@drawable/ic_repeat"/>
+ android:padding="@dimen/normal_margin"/>
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index ad4e5b1df..4566b58f6 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -26,11 +26,11 @@
Termin erfolgreich in der Vergangenheit hinzugefügt
Termin erfolgreich aktualisiert
Erinnerung
- Aus
+ No reminder
Zu Beginn
Benutzerdefiniert
Wiederholung
- Keine
+ No repetition
Täglich
Wöchentlich
Zweiwöchentlich
diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml
index 8e86c58de..3a497840f 100644
--- a/app/src/main/res/values-es-rES/strings.xml
+++ b/app/src/main/res/values-es-rES/strings.xml
@@ -26,11 +26,11 @@
El evento en el pasado se ha añadido con éxito
El evento se ha actualizado con éxito
Recordatorio
- Apagado
+ No reminder
Al inicio
Personalizado
Repetición
- Ninguno
+ No repetition
Diario
Semanal
Quincenal
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index a3339ce36..8663d7a98 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -26,11 +26,11 @@
Evénement dans le passé ajouté avec succès
Evénement ajouté avec succès
Rappel
- Désactivé
+ No reminder
Au démarrage
Personnalisé
Répétition
- Aucune
+ No repetition
Quotidienne
Hebdomadaire
Bihebdomadaire
diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml
index ec60a4122..37c3cff33 100644
--- a/app/src/main/res/values-hi-rIN/strings.xml
+++ b/app/src/main/res/values-hi-rIN/strings.xml
@@ -26,11 +26,11 @@
भुत में इवेंट सफलतापूर्वक जोड़ा गया
इवेंट सफलतापूर्वक अपडेट किया गया
रिमाइंडर
- ऑफ
+ No reminder
शुरुआत के समय
Custom
दुहराव
- कोई नहीं
+ No repetition
रोज
साप्ताहिक
हर दो सफ्ताह
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 70d6ed626..69fd31a6b 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -26,11 +26,11 @@
Korábbi bejegyzés hozzáadva
Bejegyzés frissítve
Emlékeztető
- Ki
+ No reminder
A kezdetekor
Egyedi
Ismétlés
- Nincs
+ No repetition
Naponta
Hetente
Kéthetente
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 99d5da6b4..b486154af 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -26,11 +26,11 @@
Event in the past added successfully
Evento aggiornato correttamente
Promemoria
- Off
+ No reminder
All\'inizio
Custom
Repetition
- None
+ No repetition
Daily
Weekly
Biweekly
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index 28507ba86..447bc7818 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -26,11 +26,11 @@
אירוע בעבר הוסף בהצלחה
האירוע עודכן בהצלחה
תזכורת
- כבוי
+ No reminder
בהתחלה
מותאם אישית
Repetition
- ללא
+ No repetition
יום-יומית
שבועית
דו-שבועית
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 620f299a6..344b62780 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -26,11 +26,11 @@
過去のイベントを正常に追加しました
イベントを正常に更新しました
リマインダー
- オフ
+ No reminder
開始時
カスタム
繰り返し
- なし
+ No repetition
毎日
毎週
隔週
diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml
index 39af0cbcb..fc1bbb79e 100644
--- a/app/src/main/res/values-pt-rPT/strings.xml
+++ b/app/src/main/res/values-pt-rPT/strings.xml
@@ -26,11 +26,11 @@
Evento no passado adicionado com sucesso
Evento atualizado com sucesso
Lembrete
- Desligado
+ No reminder
No início
Personalizado
Repetição
- Nenhuma
+ No repetition
Diária
Semanal
Bissemanal
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index e58affa74..076972867 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -26,11 +26,11 @@
Событие в прошлом успешно создано
Событие успешно обновлено
Напоминание
- Отключено
+ No reminder
С наступлением события
Настраиваемое
Повторять
- Нет
+ No repetition
Ежедневно
Еженедельно
Раз в две недели
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index dd4cfeed6..105dc09ea 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -26,11 +26,11 @@
Händelsen ät tillagd
Händelsen uppdaterad
Påminnelse
- Av
+ No reminder
Vid start
Egen
Repetition
- Ingen
+ No repetition
Dagligen
Veckovis
Varannan vecka
diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml
index b47143009..7d85fdf3b 100644
--- a/app/src/main/res/values/array.xml
+++ b/app/src/main/res/values/array.xml
@@ -1,7 +1,7 @@
- - @string/off
+ - @string/no_reminder
- @string/at_start
- @string/custom
@@ -13,7 +13,7 @@
- - @string/none
+ - @string/no_repetition
- @string/daily
- @string/weekly
- @string/biweekly
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4b85b313c..1536647c1 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -26,11 +26,11 @@
Event in the past added successfully
Event updated successfully
Reminder
- Off
+ No reminder
At start
Custom
Repetition
- None
+ No repetition
Daily
Weekly
Biweekly