Skip to content

Commit d728c03

Browse files
author
Jesse Hoobergs
committed
Create constructor for WeekViewEvent with Allday parameter
1 parent cc34a54 commit d728c03

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

library/src/main/java/com/alamkanak/weekview/WeekViewEvent.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class WeekViewEvent {
1313
private String mName;
1414
private String mLocation;
1515
private int mColor;
16+
private boolean mAllDay;
1617

1718
public WeekViewEvent(){
1819

@@ -60,13 +61,27 @@ public WeekViewEvent(long id, String name, int startYear, int startMonth, int st
6061
* @param location The location of the event.
6162
* @param startTime The time when the event starts.
6263
* @param endTime The time when the event ends.
64+
* @param allDay Is the event an all day event
6365
*/
64-
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime) {
66+
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime, boolean allDay) {
6567
this.mId = id;
6668
this.mName = name;
6769
this.mLocation = location;
6870
this.mStartTime = startTime;
6971
this.mEndTime = endTime;
72+
this.mAllDay = allDay;
73+
}
74+
75+
/**
76+
* Initializes the event for week view.
77+
* @param id The id of the event.
78+
* @param name Name of the event.
79+
* @param location The location of the event.
80+
* @param startTime The time when the event starts.
81+
* @param endTime The time when the event ends.
82+
*/
83+
public WeekViewEvent(long id, String name, String location, Calendar startTime, Calendar endTime) {
84+
this(id, name, location, startTime, endTime, false);
7085
}
7186

7287
/**

0 commit comments

Comments
 (0)