1

What am I missing in that I want to use a CalendarView to select a date. Yet when I code up the following, the onCateChangeListener is called when I scroll. I only want it to fire when a date is clicked.

  calendar.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
        @Override
        public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {
            Log.v("#####", "Date Change: " + month + "/" + dayOfMonth + "/" + year);
        }
    });
justdan0227
  • 1,374
  • 18
  • 48
  • 1
    this might help you : http://stackoverflow.com/questions/12641250/android-calendarview-ondatechangelistener – Zaki Feb 29 '16 at 16:50
  • Thanks, I thought of this as well as a hack, but didn't know if the platform had updated CalendarView to include an onClickForSelectedDate. Thanks – justdan0227 Mar 01 '16 at 17:18

1 Answers1

0

So Zaki's suggestion on Android: CalendarView OnDateChangeLIstener shows a solution - was just wondering if the Android Team had implemented an onClickHandler that would do that same thing. Thanks Zaki for pointing this out.

Community
  • 1
  • 1
justdan0227
  • 1,374
  • 18
  • 48