From: Marius Gavrilescu Date: Sun, 9 Jun 2013 19:58:04 +0000 (+0300) Subject: Add colour to Calendar X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=3ba21b0a3d20fb7fa49567637bbb71c76fb87e3e;p=unical.git Add colour to Calendar --- 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