Skip to content

Commit 354bb23

Browse files
author
Laurent Meyer
committed
Documented the interfaces
1 parent 8aa4ec6 commit 354bb23

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,22 +1457,46 @@ public double getFirstVisibleHour(){
14571457
/////////////////////////////////////////////////////////////////
14581458

14591459
public interface EventClickListener {
1460+
/**
1461+
* Triggered when clicked on one existing event
1462+
* @param event: event clicked.
1463+
* @param eventRect: view containing the clicked event.
1464+
*/
14601465
public void onEventClick(WeekViewEvent event, RectF eventRect);
14611466
}
14621467

14631468
public interface MonthChangeListener {
1469+
/**
1470+
* Very important interface, it's the base to load events in the calendar.
1471+
* @param newYear: year of the events required by the view.
1472+
* @param newMonth: month of the events required by the view.
1473+
* @return a list of the events happening <strong>during the specified month</strong>.
1474+
*/
14641475
public List<WeekViewEvent> onMonthChange(int newYear, int newMonth);
14651476
}
14661477

14671478
public interface EventLongPressListener {
1479+
/**
1480+
* Similar to #EventClickListener but with a long press.
1481+
* @param event: event clicked.
1482+
* @param eventRect: view containing the clicked event.
1483+
*/
14681484
public void onEventLongPress(WeekViewEvent event, RectF eventRect);
14691485
}
14701486

14711487
public interface EmptyViewClickListener {
1488+
/**
1489+
* Triggered when the users clicks on a empty space of the calendar.
1490+
* @param time: #Calendar object set with the date and time of the clicked position on the view.
1491+
*/
14721492
public void onEmptyViewClicked(Calendar time);
14731493
}
14741494

14751495
public interface EmptyViewLongPressListener {
1496+
/**
1497+
* Similar to EmptyViewClickListener but with long press.
1498+
* @param time: #Calendar object set with the date and time of the long pressed position on the view.
1499+
*/
14761500
public void onEmptyViewLongPress(Calendar time);
14771501
}
14781502

0 commit comments

Comments
 (0)