prolificinteractive / material-calendarview

A Material design back port of Android's CalendarView
https://prolificinteractive.github.io/material-calendarview/
MIT License
5.91k stars 1.32k forks source link

How to refresh Decorator? #1078

Closed Jun-Hub closed 3 years ago

Jun-Hub commented 3 years ago

Everytime DB which is attached with Canlendar update, let canlendar update the DB with Decorator, I use 'removeDecorators()' as a refresh before update of decorator.

  `calendarView.removeDecorators()
   calendarView.invalidateDecorators()

   calendarView.addDecorators(
        TodayDecorator(),
        WeekendDecprator()
    )`

But when calendarView doesn't have any Decorator, "calendarView.removeDecorators() null object" error occurs.