Follow this link to get the library mCalendarView
1.Use 3rd party library McalenderView.
2.Add to your gradle:-
'sun.bob:mcalendarview:1.0.0'
Try this code:-
3.Some code:-
calendarView = ((MCalendarView) view.findViewById(R.id.calendar_exp));
ArrayList<DateData> dates=new ArrayList<>();
dates.add(new DateData(2018,04,26));
dates.add(new DateData(2018,04,27));
for(int i=0;i<dates.size();i++) {
calendarView.markDate(dates.get(i).getYear(),dates.get(i).getMonth(),dates.get(i).getDay());//mark multiple dates with this code.
}
Log.d("marked dates:-",""+calendarView.getMarkedDates());//get all marked dates.