-
-
Notifications
You must be signed in to change notification settings - Fork 22
Description
From what I can tell, you can retrieve all fields on Android for a calendar's events, except "eventColor".
If necessary, use conditional defines if event color is not implemented on other platforms. This is an easy change:
In CalendarEvent.Shared.cs, add the following to CalendarEvent class
public int EventColor { get; internal set; }
In CalendarStore.Android.cs, Update definition of eventColums to add:
CalendarContract.Events.InterfaceConsts.EventColor
In return statement for ToEvent(ICursor cursor, List projection), add setting EventColor like this:
EventColor = cursor.GetInt(projection.IndexOf(
CalendarContract.Events.InterfaceConsts.EventColor))
It may be better to define EventColor as an unsigned int or better yet, define an enum to match the Android calendar colors, then map the calendar value to the enum on retrieval and enum to color for setting.
I only have interest in retrieving the event color, not setting it, so setting the event color is not shown here.