use of com.prolificinteractive.materialcalendarview.OnDateSelectedListener in project GeekNews by codeestX.
the class CalendarActivity method initEventAndData.
@Override
protected void initEventAndData() {
setToolBar(mToolbar, "选择日期");
mCalender.state().edit().setFirstDayOfWeek(Calendar.WEDNESDAY).setMinimumDate(CalendarDay.from(2013, 5, 20)).setMaximumDate(CalendarDay.from(DateUtil.getCurrentYear(), DateUtil.getCurrentMonth(), DateUtil.getCurrentDay())).setCalendarDisplayMode(CalendarMode.MONTHS).commit();
mCalender.setOnDateChangedListener(new OnDateSelectedListener() {
@Override
public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay date, boolean selected) {
mDate = date;
}
});
}
Aggregations