square/android-times-square — pull request #13 by trant (2013-03-14 12:23:59+00:00)
Title: The Activity which holds the Calendar will be notified whenever a new date is picked by the user

...ged event. When the user selects a new date the activity gets notified.

For this the Activity or Fragment must implement the interface IActivityHook.java. The method newDateSelected(Date dateSelected); will then be called whenever the user selects a new date.

Example

//todo check the date from the offer and limitate the calendar
Calendar nextYear = Calendar.getInstance();
nextYear.add(Calendar.YEAR, 1);

final CalendarPickerView calendar = (CalendarPickerView) mRoot.findViewById(R.id.calendar_view);
calendar.init(new Date(), new Date(), nextYear.getTime(),this);