Calendars.VISIBLE,
Calendars.ACCOUNT_NAME,
Calendars.ACCOUNT_TYPE,
+ Calendars.CALENDAR_COLOR,
};
/** Calendar ID */
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){
cursor.moveToFirst();
final Calendar[] calendars = new Calendar[cursor.getCount()];
for(int i=0;i<calendars.length;i++){
- calendars[i]=new Calendar(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getInt(3)!=0, cursor.getString(4), cursor.getString(5));
+ calendars[i]=new Calendar(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getInt(3)!=0, cursor.getString(4), cursor.getString(5), cursor.getInt(6));
cursor.moveToNext();
}
cursor.close();