From 3ba21b0a3d20fb7fa49567637bbb71c76fb87e3e Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 9 Jun 2013 22:58:04 +0300 Subject: [PATCH] Add colour to Calendar --- src/ro/ieval/unical/Calendar.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ro/ieval/unical/Calendar.java b/src/ro/ieval/unical/Calendar.java index 11b2667..1ab1988 100644 --- a/src/ro/ieval/unical/Calendar.java +++ b/src/ro/ieval/unical/Calendar.java @@ -14,6 +14,7 @@ final class Calendar { Calendars.VISIBLE, Calendars.ACCOUNT_NAME, Calendars.ACCOUNT_TYPE, + Calendars.CALENDAR_COLOR, }; /** Calendar ID */ @@ -28,14 +29,17 @@ final class Calendar { public final String accountName; /** Type of the calendar used to sync this calendar */ public final String accountType; + /** Calendar colour */ + public final int colour; - private Calendar(final long _id, final String name, final String displayName, final boolean visible, final String accountName, final String accountType) { + private Calendar(final long _id, final String name, final String displayName, final boolean visible, final String accountName, final String accountType, final int colour) { this._id=_id; this.name=name; this.displayName=displayName; this.visible=visible; this.accountName=accountName; this.accountType=accountType; + this.colour=colour; } public static Calendar[] getAllCalendars(final Context context){ @@ -44,7 +48,7 @@ final class Calendar { cursor.moveToFirst(); final Calendar[] calendars = new Calendar[cursor.getCount()]; for(int i=0;i