Skip to content

Commit e154e5f

Browse files
author
Jens Claes
committed
Merge branch 'pr-144' into develop
2 parents 0ec1a8a + 32726ec commit e154e5f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,22 +1599,48 @@ public double getFirstVisibleHour(){
15991599
/////////////////////////////////////////////////////////////////
16001600

16011601
public interface EventClickListener {
1602+
/**
1603+
* Triggered when clicked on one existing event
1604+
* @param event: event clicked.
1605+
* @param eventRect: view containing the clicked event.
1606+
*/
16021607
public void onEventClick(WeekViewEvent event, RectF eventRect);
16031608
}
16041609

16051610
public interface MonthChangeListener {
1611+
/**
1612+
* Very important interface, it's the base to load events in the calendar.
1613+
* This method is called three times: once to load the previous month, once to load the next month and once to load the current month.<br/>
1614+
* <strong>That's why you can have three times the same event at the same place if you mess up with the configuration</strong>
1615+
* @param newYear: year of the events required by the view.
1616+
* @param newMonth: month of the events required by the view <br/><strong>1 based (not like JAVA API) --> January = 1 and December = 12</strong>.
1617+
* @return a list of the events happening <strong>during the specified month</strong>.
1618+
*/
16061619
public List<WeekViewEvent> onMonthChange(int newYear, int newMonth);
16071620
}
16081621

16091622
public interface EventLongPressListener {
1623+
/**
1624+
* Similar to {@link com.alamkanak.weekview.WeekView.EventClickListener} but with a long press.
1625+
* @param event: event clicked.
1626+
* @param eventRect: view containing the clicked event.
1627+
*/
16101628
public void onEventLongPress(WeekViewEvent event, RectF eventRect);
16111629
}
16121630

16131631
public interface EmptyViewClickListener {
1632+
/**
1633+
* Triggered when the users clicks on a empty space of the calendar.
1634+
* @param time: {@link Calendar} object set with the date and time of the clicked position on the view.
1635+
*/
16141636
public void onEmptyViewClicked(Calendar time);
16151637
}
16161638

16171639
public interface EmptyViewLongPressListener {
1640+
/**
1641+
* Similar to {@link com.alamkanak.weekview.WeekView.EmptyViewClickListener} but with long press.
1642+
* @param time: {@link Calendar} object set with the date and time of the long pressed position on the view.
1643+
*/
16181644
public void onEmptyViewLongPress(Calendar time);
16191645
}
16201646

0 commit comments

Comments
 (0)