You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The event list contains CalendarEvent instances, see the description of the parameters:
51
+
The event list contains BaseCalendarEvent instances, see the description of the parameters:
52
52
```java
53
53
/**
54
54
* Initializes the event
55
-
* @param title The title of the event.
55
+
*
56
+
* @param id The id of the event.
57
+
* @param color The color of the event.
58
+
* @param title The title of the event.
56
59
* @param description The description of the event.
57
-
* @param location The location of the event.
58
-
* @param color The color of the event (for display in the app).
59
-
* @param startTime The start time of the event.
60
-
* @param endTime The end time of the event.
61
-
* @param allDay Indicates if the event lasts the whole day.
60
+
* @param location The location of the event.
61
+
* @param dateStart The start date of the event.
62
+
* @param dateEnd The end date of the event.
63
+
* @param allDay Int that can be equal to 0 or 1.
64
+
* @param duration The duration of the event in RFC2445 format.
62
65
*/
63
-
public CalendarEvent(String title, String description, String location, int color, Calendar startTime, Calendar endTime, boolean allDay) {
66
+
public BaseCalendarEvent(long id, int color, String title, String description, String location, long dateStart, long dateEnd, int allDay, String duration) {
67
+
this.mId = id;
68
+
this.mColor = color;
69
+
this.mAllDay = (allDay == 1) ? true : false;
70
+
this.mDuration = duration;
64
71
this.mTitle = title;
65
72
this.mDescription = description;
66
73
this.mLocation = location;
67
-
this.mColor = color;
68
-
this.mStartTime = startTime;
69
-
this.mEndTime = endTime;
70
-
this.mAllDay = allDay;
74
+
75
+
this.mStartTime = Calendar.getInstance();
76
+
this.mStartTime.setTimeInMillis(dateStart);
77
+
this.mEndTime = Calendar.getInstance();
78
+
this.mEndTime.setTimeInMillis(dateEnd);
71
79
}
72
80
````
73
-
Here is a quick (and very simple) example providing a list of events, you can provide serveral layouts too:
81
+
Here is a quick (and very simple) example providing a list of events, you can provide several layouts too:
0 commit comments