Skip to content

Commit acdb9c9

Browse files
committed
Update README.md
1 parent 5617b65 commit acdb9c9

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,40 @@ Then configure it in your code with a start and end date associated with a list
4848
mAgendaCalendarView.init(eventList, minDate, maxDate, Locale.getDefault(), this);
4949
````
5050
51-
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:
5252
```java
5353
/**
5454
* 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.
5659
* @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.
6265
*/
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;
6471
this.mTitle = title;
6572
this.mDescription = description;
6673
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);
7179
}
7280
````
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:
7482
7583
```java
84+
private void mockList(List<CalendarEvent> eventList) {
7685
Calendar startTime1 = Calendar.getInstance();
7786
Calendar endTime1 = Calendar.getInstance();
7887
endTime1.add(Calendar.MONTH, 1);
@@ -88,7 +97,7 @@ Here is a quick (and very simple) example providing a list of events, you can pr
8897
ContextCompat.getColor(this, R.color.yellow), startTime2, endTime2, true);
8998
eventList.add(event2);
9099
91-
// Example on how you can provide your own layout
100+
// Example on how to provide your own layout
92101
Calendar startTime3 = Calendar.getInstance();
93102
Calendar endTime3 = Calendar.getInstance();
94103
startTime3.set(Calendar.HOUR_OF_DAY, 14);
@@ -109,6 +118,9 @@ Here is a quick (and very simple) example providing a list of events, you can pr
109118
# Participating?
110119
Make your pull requests on feature or bugfix branches.
111120
121+
# Special thanks to these contributors
122+
[FHellmann](https://github.com/FHellmann)
123+
112124
License
113125
-----------
114126

0 commit comments

Comments
 (0)