I am using the Android CalendarView to create a simple Calendar app. I need to get the Month when the user presses the previous or next buttons in the calendar view. The CalendarView doesn't have any methods to get the month when the user clicks those buttons, so I tried using the following code to extract the Month.
ViewGroup vg = (ViewGroup) calendarView.getChildAt(0);
View subView = vg.getChildAt(0);
but for some reason the ViewGroup holds a DayPickerViewPager widget, and 2 AppcompatImageButtons (the previous and next buttons), but no TextView or anything like that which holds the actual Month name.
The subView holds the DayPickerViewPager. Does anyone know how I can get the month on previous/next button clicks?
Thank you in advance