I\'ve already implemented this listener in order for me to display something when a certain date is clicked, but the problem is that when i scroll the CalendarView down, it
I just had the same problem and found a work-around for it.
create "Long date" variable and when you start your calender window save the current date in this variable.
Long date;
cv = (CalendarView)findViewById(R.id.calendarView1);
date = cv.getDate();
now in the listener just check if the new date is same as the calendar:
cv.setOnDateChangeListener(new OnDateChangeListener(){
public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {
if(cv.getDate() != date){
date = cv.getDate();
Toast.makeText(view.getContext(), "Year=" + year + " Month=" + month + " Day=" + dayOfMonth, Toast.LENGTH_LONG).show();
}
}
});
it worked for me :)