How to highlight multiple dates in a android CalendarView programmatically

后端 未结 1 1857
遇见更好的自我
遇见更好的自我 2020-12-31 19:43

I need to highlight several dates in a CalendaView. that should look like,

I tried setDate(), but it didn\'t work as I want. Please help me to find a s

1条回答
  •  耶瑟儿~
    2020-12-31 20:14

    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 dates=new ArrayList<>();
        dates.add(new DateData(2018,04,26));
        dates.add(new DateData(2018,04,27));
    
        for(int i=0;i

    0 讨论(0)
提交回复
热议问题