From 70b0e93e0cb65318f217985476a553cef5ab3058 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 19 Nov 2021 21:59:13 +0100 Subject: [PATCH] updating Commons and a couple details here and there --- app/build.gradle | 4 +- .../calendar/pro/activities/EventActivity.kt | 12 +++-- .../pro/adapters/FilterEventTypeAdapter.kt | 6 +-- .../pro/adapters/ManageEventTypesAdapter.kt | 11 ++--- .../pro/dialogs/EditEventTypeDialog.kt | 2 +- .../pro/dialogs/ImportEventsDialog.kt | 48 ++++++++++--------- .../pro/dialogs/SelectEventCalendarDialog.kt | 9 ++-- .../pro/dialogs/SelectEventTypeColorDialog.kt | 3 +- .../pro/dialogs/SelectEventTypeDialog.kt | 19 +++++--- .../calendar/pro/extensions/Context.kt | 5 +- .../res/drawable/event_list_color_bar.xml | 10 ++-- .../main/res/drawable/ic_calendar_vector.xml | 10 +--- .../res/drawable/ic_change_view_vector.xml | 10 +--- .../main/res/drawable/ic_circle_vector.xml | 3 ++ app/src/main/res/drawable/ic_color_vector.xml | 10 +--- .../main/res/drawable/ic_event_available.xml | 9 ---- .../drawable/ic_event_available_vector.xml | 3 ++ .../res/drawable/ic_event_busy_vector.xml | 3 ++ .../main/res/drawable/ic_event_occupied.xml | 9 ---- app/src/main/res/drawable/ic_globe_vector.xml | 10 +--- .../main/res/drawable/ic_repeat_vector.xml | 3 ++ app/src/main/res/drawable/ic_today_vector.xml | 10 +--- app/src/main/res/layout/activity_event.xml | 20 ++++---- app/src/main/res/menu/menu_event.xml | 12 ++--- app/src/main/res/menu/menu_main.xml | 6 ++- 25 files changed, 110 insertions(+), 137 deletions(-) create mode 100644 app/src/main/res/drawable/ic_circle_vector.xml delete mode 100644 app/src/main/res/drawable/ic_event_available.xml create mode 100644 app/src/main/res/drawable/ic_event_available_vector.xml create mode 100644 app/src/main/res/drawable/ic_event_busy_vector.xml delete mode 100644 app/src/main/res/drawable/ic_event_occupied.xml create mode 100644 app/src/main/res/drawable/ic_repeat_vector.xml diff --git a/app/build.gradle b/app/build.gradle index 07af65cc4..0870555ca 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,10 +63,10 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:f1d626ef3d' + implementation 'com.github.SimpleMobileTools:Simple-Commons:307941253d' implementation 'joda-time:joda-time:2.10.3' implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.2' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation "androidx.print:print:1.0.0" diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index 7f9a581f4..80d672832 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -288,6 +288,10 @@ class EventActivity : SimpleActivity() { } private fun isEventChanged(): Boolean { + if (!this::mEvent.isInitialized) { + return false + } + var newStartTS: Long var newEndTS: Long getStartEndTimes().apply { @@ -881,13 +885,13 @@ class EventActivity : SimpleActivity() { private fun updateReminderTypeImage(view: ImageView, reminder: Reminder) { view.beVisibleIf(reminder.minutes != REMINDER_OFF && mEventCalendarId != STORED_LOCALLY_ONLY) - val drawable = if (reminder.type == REMINDER_NOTIFICATION) R.drawable.ic_bell_vector else R.drawable.ic_email_vector + val drawable = if (reminder.type == REMINDER_NOTIFICATION) R.drawable.ic_bell_vector else R.drawable.ic_mail_vector val icon = resources.getColoredDrawableWithColor(drawable, config.textColor) view.setImageDrawable(icon) } private fun updateAvailabilityImage() { - val drawable = if (mAvailability == Attendees.AVAILABILITY_FREE) R.drawable.ic_event_available else R.drawable.ic_event_occupied + val drawable = if (mAvailability == Attendees.AVAILABILITY_FREE) R.drawable.ic_event_available_vector else R.drawable.ic_event_busy_vector val icon = resources.getColoredDrawableWithColor(drawable, config.textColor) event_availability_image.setImageDrawable(icon) } @@ -906,7 +910,7 @@ class EventActivity : SimpleActivity() { if (eventType != null) { runOnUiThread { event_type.text = eventType.title - event_type_color.setFillWithStroke(eventType.color, config.backgroundColor, getCornerRadius()) + event_type_color.setFillWithStroke(eventType.color, config.backgroundColor) } } } @@ -974,7 +978,7 @@ class EventActivity : SimpleActivity() { val calendarColor = eventsHelper.getEventTypeWithCalDAVCalendarId(currentCalendar.id)?.color ?: currentCalendar.color runOnUiThread { - event_caldav_calendar_color.setFillWithStroke(calendarColor, config.backgroundColor, getCornerRadius()) + event_caldav_calendar_color.setFillWithStroke(calendarColor, config.backgroundColor) event_caldav_calendar_name.apply { text = currentCalendar.displayName setPadding(paddingLeft, paddingTop, paddingRight, resources.getDimension(R.dimen.tiny_margin).toInt()) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/FilterEventTypeAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/FilterEventTypeAdapter.kt index c2bee12bd..58dbee2ef 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/FilterEventTypeAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/FilterEventTypeAdapter.kt @@ -8,14 +8,12 @@ import com.simplemobiletools.calendar.pro.activities.SimpleActivity import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.models.EventType import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor -import com.simplemobiletools.commons.extensions.getCornerRadius import com.simplemobiletools.commons.extensions.setFillWithStroke import kotlinx.android.synthetic.main.filter_event_type_view.view.* import java.util.* class FilterEventTypeAdapter(val activity: SimpleActivity, val eventTypes: List, val displayEventTypes: Set) : - RecyclerView.Adapter() { - private val cornerRadius = activity.getCornerRadius() + RecyclerView.Adapter() { private val selectedKeys = HashSet() init { @@ -57,7 +55,7 @@ class FilterEventTypeAdapter(val activity: SimpleActivity, val eventTypes: List< filter_event_type_checkbox.isChecked = isSelected filter_event_type_checkbox.setColors(activity.config.textColor, activity.getAdjustedPrimaryColor(), activity.config.backgroundColor) filter_event_type_checkbox.text = eventType.getDisplayTitle() - filter_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor, cornerRadius) + filter_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor) filter_event_type_holder.setOnClickListener { viewClicked(!isSelected, eventType) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt index 99bdcc1ed..fcc90c806 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/ManageEventTypesAdapter.kt @@ -13,7 +13,6 @@ import com.simplemobiletools.calendar.pro.models.EventType import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog -import com.simplemobiletools.commons.extensions.getCornerRadius import com.simplemobiletools.commons.extensions.setFillWithStroke import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.models.RadioItem @@ -21,10 +20,10 @@ import com.simplemobiletools.commons.views.MyRecyclerView import kotlinx.android.synthetic.main.item_event_type.view.* import java.util.* -class ManageEventTypesAdapter(activity: SimpleActivity, val eventTypes: ArrayList, val listener: DeleteEventTypesListener?, recyclerView: MyRecyclerView, - itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { - private val cornerRadius = activity.getCornerRadius() - +class ManageEventTypesAdapter( + activity: SimpleActivity, val eventTypes: ArrayList, val listener: DeleteEventTypesListener?, recyclerView: MyRecyclerView, + itemClick: (Any) -> Unit +) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { init { setupDragListener(true) } @@ -71,7 +70,7 @@ class ManageEventTypesAdapter(activity: SimpleActivity, val eventTypes: ArrayLis view.apply { event_item_frame.isSelected = selectedKeys.contains(eventType.id?.toInt()) event_type_title.text = eventType.getDisplayTitle() - event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor, cornerRadius) + event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor) event_type_title.setTextColor(textColor) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt index 4e4c5224b..2d78fb8e3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/EditEventTypeDialog.kt @@ -56,7 +56,7 @@ class EditEventTypeDialog(val activity: Activity, var eventType: EventType? = nu } private fun setupColor(view: ImageView) { - view.setFillWithStroke(eventType!!.color, activity.config.backgroundColor, activity.getCornerRadius()) + view.setFillWithStroke(eventType!!.color, activity.config.backgroundColor) } private fun eventTypeConfirmed(title: String, dialog: AlertDialog) { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/ImportEventsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/ImportEventsDialog.kt index 2b575c0f0..197077e6b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/ImportEventsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/ImportEventsDialog.kt @@ -8,9 +8,11 @@ import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.eventTypesDB import com.simplemobiletools.calendar.pro.extensions.eventsHelper import com.simplemobiletools.calendar.pro.helpers.IcsImporter -import com.simplemobiletools.calendar.pro.helpers.IcsImporter.ImportResult.* +import com.simplemobiletools.calendar.pro.helpers.IcsImporter.ImportResult.IMPORT_FAIL +import com.simplemobiletools.calendar.pro.helpers.IcsImporter.ImportResult.IMPORT_NOTHING_NEW +import com.simplemobiletools.calendar.pro.helpers.IcsImporter.ImportResult.IMPORT_OK +import com.simplemobiletools.calendar.pro.helpers.IcsImporter.ImportResult.IMPORT_PARTIAL import com.simplemobiletools.calendar.pro.helpers.REGULAR_EVENT_TYPE_ID -import com.simplemobiletools.commons.extensions.getCornerRadius import com.simplemobiletools.commons.extensions.setFillWithStroke import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.toast @@ -64,22 +66,22 @@ class ImportEventsDialog(val activity: SimpleActivity, val path: String, val cal } AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok, null) - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this, R.string.import_events) { - getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { - getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(null) - activity.toast(R.string.importing) - ensureBackgroundThread { - val overrideFileEventTypes = view.import_events_checkbox.isChecked - val result = IcsImporter(activity).importEvents(path, currEventTypeId, currEventTypeCalDAVCalendarId, overrideFileEventTypes) - handleParseResult(result) - dismiss() - } + .setPositiveButton(R.string.ok, null) + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this, R.string.import_events) { + getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { + getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(null) + activity.toast(R.string.importing) + ensureBackgroundThread { + val overrideFileEventTypes = view.import_events_checkbox.isChecked + val result = IcsImporter(activity).importEvents(path, currEventTypeId, currEventTypeCalDAVCalendarId, overrideFileEventTypes) + handleParseResult(result) + dismiss() } } } + } } private fun updateEventType(view: ViewGroup) { @@ -87,18 +89,20 @@ class ImportEventsDialog(val activity: SimpleActivity, val path: String, val cal val eventType = activity.eventTypesDB.getEventTypeWithId(currEventTypeId) activity.runOnUiThread { view.import_event_type_title.text = eventType!!.getDisplayTitle() - view.import_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor, activity.getCornerRadius()) + view.import_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor) } } } private fun handleParseResult(result: IcsImporter.ImportResult) { - activity.toast(when (result) { - IMPORT_NOTHING_NEW -> R.string.no_new_items - IMPORT_OK -> R.string.importing_successful - IMPORT_PARTIAL -> R.string.importing_some_entries_failed - else -> R.string.no_items_found - }) + activity.toast( + when (result) { + IMPORT_NOTHING_NEW -> R.string.no_new_items + IMPORT_OK -> R.string.importing_successful + IMPORT_PARTIAL -> R.string.importing_some_entries_failed + else -> R.string.no_items_found + } + ) callback(result != IMPORT_FAIL) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventCalendarDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventCalendarDialog.kt index 1e70f1f4b..6e28d0f37 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventCalendarDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/SelectEventCalendarDialog.kt @@ -11,7 +11,6 @@ import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.eventsHelper import com.simplemobiletools.calendar.pro.helpers.STORED_LOCALLY_ONLY import com.simplemobiletools.calendar.pro.models.CalDAVCalendar -import com.simplemobiletools.commons.extensions.getCornerRadius import com.simplemobiletools.commons.extensions.setFillWithStroke import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.updateTextColors @@ -47,9 +46,9 @@ class SelectEventCalendarDialog(val activity: Activity, val calendars: List Unit) { +class SelectEventTypeDialog( + val activity: Activity, val currEventType: Long, val showCalDAVCalendars: Boolean, val showNewEventTypeOption: Boolean, + val addLastUsedOneAsFirstOption: Boolean, val showOnlyWritable: Boolean, val callback: (eventType: EventType) -> Unit +) { private val NEW_EVENT_TYPE_ID = -2L private val LAST_USED_EVENT_TYPE_ID = -1L @@ -49,9 +54,9 @@ class SelectEventTypeDialog(val activity: Activity, val currEventType: Long, val } dialog = AlertDialog.Builder(activity) - .create().apply { - activity.setupDialogStuff(view, this) - } + .create().apply { + activity.setupDialogStuff(view, this) + } } private fun addRadioButton(eventType: EventType) { @@ -63,7 +68,7 @@ class SelectEventTypeDialog(val activity: Activity, val currEventType: Long, val } if (eventType.color != Color.TRANSPARENT) { - view.dialog_radio_color.setFillWithStroke(eventType.color, activity.config.backgroundColor, activity.getCornerRadius()) + view.dialog_radio_color.setFillWithStroke(eventType.color, activity.config.backgroundColor) } view.setOnClickListener { viewClicked(eventType) } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index f6f94af1c..0ddbaba29 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -436,7 +436,7 @@ fun Context.addDayNumber(rawTextColor: Int, day: DayMonthly, linearLayout: Linea } private fun addTodaysBackground(textView: TextView, res: Resources, dayLabelHeight: Int, primaryColor: Int) = - textView.addResizedBackgroundDrawable(res, dayLabelHeight, primaryColor, R.drawable.ic_circle_filled) + textView.addResizedBackgroundDrawable(res, dayLabelHeight, primaryColor, R.drawable.ic_circle_vector) fun Context.addDayEvents(day: DayMonthly, linearLayout: LinearLayout, res: Resources, dividerMargin: Int) { val eventLayoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) @@ -507,7 +507,8 @@ fun Context.getEventListItems(events: List, addSections: Boolean = true): listItems.add(listSection) prevCode = code } - val listEvent = ListEvent(it.id!!, it.startTS, it.endTS, it.title, it.description, it.getIsAllDay(), it.color, it.location, it.isPastEvent, it.repeatInterval > 0) + val listEvent = + ListEvent(it.id!!, it.startTS, it.endTS, it.title, it.description, it.getIsAllDay(), it.color, it.location, it.isPastEvent, it.repeatInterval > 0) listItems.add(listEvent) } return listItems diff --git a/app/src/main/res/drawable/event_list_color_bar.xml b/app/src/main/res/drawable/event_list_color_bar.xml index 05d2b9550..7db18a312 100644 --- a/app/src/main/res/drawable/event_list_color_bar.xml +++ b/app/src/main/res/drawable/event_list_color_bar.xml @@ -1,15 +1,13 @@ - + android:height="@dimen/event_color_bar_height" /> - + - + diff --git a/app/src/main/res/drawable/ic_calendar_vector.xml b/app/src/main/res/drawable/ic_calendar_vector.xml index f07e6b2c5..4898e4c9c 100644 --- a/app/src/main/res/drawable/ic_calendar_vector.xml +++ b/app/src/main/res/drawable/ic_calendar_vector.xml @@ -1,9 +1,3 @@ - - + + diff --git a/app/src/main/res/drawable/ic_change_view_vector.xml b/app/src/main/res/drawable/ic_change_view_vector.xml index 4f0f114cd..f366299db 100644 --- a/app/src/main/res/drawable/ic_change_view_vector.xml +++ b/app/src/main/res/drawable/ic_change_view_vector.xml @@ -1,9 +1,3 @@ - - + + diff --git a/app/src/main/res/drawable/ic_circle_vector.xml b/app/src/main/res/drawable/ic_circle_vector.xml new file mode 100644 index 000000000..9fadfa977 --- /dev/null +++ b/app/src/main/res/drawable/ic_circle_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_color_vector.xml b/app/src/main/res/drawable/ic_color_vector.xml index 929631494..39bdfcb8a 100644 --- a/app/src/main/res/drawable/ic_color_vector.xml +++ b/app/src/main/res/drawable/ic_color_vector.xml @@ -1,9 +1,3 @@ - - + + diff --git a/app/src/main/res/drawable/ic_event_available.xml b/app/src/main/res/drawable/ic_event_available.xml deleted file mode 100644 index 67a9d039f..000000000 --- a/app/src/main/res/drawable/ic_event_available.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_event_available_vector.xml b/app/src/main/res/drawable/ic_event_available_vector.xml new file mode 100644 index 000000000..8c8502038 --- /dev/null +++ b/app/src/main/res/drawable/ic_event_available_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_event_busy_vector.xml b/app/src/main/res/drawable/ic_event_busy_vector.xml new file mode 100644 index 000000000..57a676dbc --- /dev/null +++ b/app/src/main/res/drawable/ic_event_busy_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_event_occupied.xml b/app/src/main/res/drawable/ic_event_occupied.xml deleted file mode 100644 index be00e9377..000000000 --- a/app/src/main/res/drawable/ic_event_occupied.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_globe_vector.xml b/app/src/main/res/drawable/ic_globe_vector.xml index 80757b91b..e87d5ade8 100644 --- a/app/src/main/res/drawable/ic_globe_vector.xml +++ b/app/src/main/res/drawable/ic_globe_vector.xml @@ -1,9 +1,3 @@ - - + + diff --git a/app/src/main/res/drawable/ic_repeat_vector.xml b/app/src/main/res/drawable/ic_repeat_vector.xml new file mode 100644 index 000000000..148f645c8 --- /dev/null +++ b/app/src/main/res/drawable/ic_repeat_vector.xml @@ -0,0 +1,3 @@ + + + diff --git a/app/src/main/res/drawable/ic_today_vector.xml b/app/src/main/res/drawable/ic_today_vector.xml index bac56e0ed..584c39910 100644 --- a/app/src/main/res/drawable/ic_today_vector.xml +++ b/app/src/main/res/drawable/ic_today_vector.xml @@ -1,9 +1,3 @@ - - + + diff --git a/app/src/main/res/layout/activity_event.xml b/app/src/main/res/layout/activity_event.xml index 19d676003..fc5fe56ab 100644 --- a/app/src/main/res/layout/activity_event.xml +++ b/app/src/main/res/layout/activity_event.xml @@ -228,7 +228,7 @@ android:layout_alignBottom="@+id/event_reminder_1" android:layout_alignParentEnd="true" android:layout_marginStart="@dimen/small_margin" - android:background="?attr/selectableItemBackground" + android:background="?attr/selectableItemBackgroundBorderless" android:padding="@dimen/activity_margin" android:src="@drawable/ic_bell_vector" /> @@ -259,7 +259,7 @@ android:layout_alignBottom="@+id/event_reminder_2" android:layout_alignParentEnd="true" android:layout_marginStart="@dimen/small_margin" - android:background="?attr/selectableItemBackground" + android:background="?attr/selectableItemBackgroundBorderless" android:padding="@dimen/activity_margin" android:src="@drawable/ic_bell_vector" /> @@ -290,7 +290,7 @@ android:layout_alignBottom="@+id/event_reminder_3" android:layout_alignParentEnd="true" android:layout_marginStart="@dimen/small_margin" - android:background="?attr/selectableItemBackground" + android:background="?attr/selectableItemBackgroundBorderless" android:padding="@dimen/activity_margin" android:src="@drawable/ic_bell_vector" /> @@ -438,22 +438,22 @@ android:layout_alignBottom="@+id/event_availability" android:layout_marginStart="@dimen/normal_margin" android:padding="@dimen/medium_margin" - android:src="@drawable/ic_event_occupied" /> + android:src="@drawable/ic_event_busy_vector" /> + android:paddingTop="@dimen/normal_margin" + android:paddingEnd="@dimen/activity_margin" + android:paddingBottom="@dimen/normal_margin" + android:text="@string/status_busy" + android:textSize="@dimen/day_text_size" /> + xmlns:app="http://schemas.android.com/apk/res-auto"> + app:showAsAction="always" /> + app:showAsAction="always" /> + app:showAsAction="always" /> + app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 2623984e5..f1dbc3d6c 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -57,10 +57,12 @@ app:showAsAction="never"/> + app:showAsAction="ifRoom" /> + app:showAsAction="ifRoom" />