@@ -1599,22 +1599,48 @@ public double getFirstVisibleHour(){
1599
1599
/////////////////////////////////////////////////////////////////
1600
1600
1601
1601
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
+ */
1602
1607
public void onEventClick (WeekViewEvent event , RectF eventRect );
1603
1608
}
1604
1609
1605
1610
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
+ */
1606
1619
public List <WeekViewEvent > onMonthChange (int newYear , int newMonth );
1607
1620
}
1608
1621
1609
1622
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
+ */
1610
1628
public void onEventLongPress (WeekViewEvent event , RectF eventRect );
1611
1629
}
1612
1630
1613
1631
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
+ */
1614
1636
public void onEmptyViewClicked (Calendar time );
1615
1637
}
1616
1638
1617
1639
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
+ */
1618
1644
public void onEmptyViewLongPress (Calendar time );
1619
1645
}
1620
1646
0 commit comments