show the selected CalDAV calendars color at the event details screen
This commit is contained in:
parent
ee506ecc4e
commit
37d6c98d58
|
@ -621,6 +621,7 @@ class EventActivity : SimpleActivity() {
|
|||
event_type_holder.beVisibleIf(currentCalendar == null)
|
||||
event_caldav_calendar_divider.beVisibleIf(currentCalendar == null)
|
||||
event_caldav_calendar_email.beGoneIf(currentCalendar == null)
|
||||
event_caldav_calendar_color.beGoneIf(currentCalendar == null)
|
||||
|
||||
if (currentCalendar == null) {
|
||||
mEventCalendarId = STORED_LOCALLY_ONLY
|
||||
|
@ -635,6 +636,10 @@ class EventActivity : SimpleActivity() {
|
|||
}
|
||||
} else {
|
||||
event_caldav_calendar_email.text = currentCalendar.accountName
|
||||
|
||||
val calendarColor = dbHelper.getEventTypeWithCalDAVCalendarId(currentCalendar.id)?.color ?: currentCalendar.color
|
||||
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())
|
||||
|
|
|
@ -403,6 +403,17 @@
|
|||
android:textSize="@dimen/meta_text_size"
|
||||
tools:text="hello@simplemobiletools.com"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/event_caldav_calendar_color"
|
||||
android:layout_width="@dimen/color_sample_size"
|
||||
android:layout_height="@dimen/color_sample_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:layout_marginRight="@dimen/activity_margin"
|
||||
android:clickable="false"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
|
@ -433,6 +444,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/event_caldav_calendar_divider"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:layout_toEndOf="@+id/event_type_image"
|
||||
android:layout_toRightOf="@+id/event_type_image"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
@ -467,7 +479,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@+id/event_type_holder"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="@color/divider_grey"
|
||||
android:importantForAccessibility="no"/>
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Reference in New Issue