I want to show a specific month to user using android CalendarView. Please help me to implement this functionality. I wrote following code but it is not working.
CalendarView calendarView = (CalendarView) findViewById(R.id.calendarView);
Calendar calendar1 = Calendar.getInstance();
calendar1.set(2016, 6, 1);
Calendar calendar2 = Calendar.getInstance();
calendar2.set(2016, 6, 30);
Hint: What is the the value of
Calendar.DATE? Documentation says 5, and so when you call this method, you are saying "5 milliseconds past Jan 01, 1970."
Sets the minimal date supported by this CalendarView in milliseconds since January 1, 1970 00:00:00 in getDefault() time zone.
Basically, that is a static field, and probably not the value that you want.
Perhaps you want
getTimeInMillis() which returns the
long for the value that you set the date at?