Hi.
I have a simple CalendarView that shows events. The events are stored in a database that is updated every now and then. I set customs decorators inside OnCreateView for five posible events,
The RoutineDecorator generates the drawables acording to the last argument, and parses a list of events, comparing each day within a event to see if belongs to the Decorator 1 to 5.
When I open the app, the decorators do not show. If I scroll two months back and forth past the dates where I have events, everything works perfectly. If I update the database and scroll, the events get updated acordingly. In resume, if I move a couple of months back and forth, everything works like a charm.
I thought by reading the documentation that I should trigger Calendar.invalidateDecorators() to refresh the decorators shown, but if I do it, the app crashes complaining of OOM. So I am wondering, what does the calendar do when I scroll to months that is different from this function and how can I trigger it manually.
Hi. I have a simple CalendarView that shows events. The events are stored in a database that is updated every now and then. I set customs decorators inside OnCreateView for five posible events,
The RoutineDecorator generates the drawables acording to the last argument, and parses a list of events, comparing each day within a event to see if belongs to the Decorator 1 to 5.
When I open the app, the decorators do not show. If I scroll two months back and forth past the dates where I have events, everything works perfectly. If I update the database and scroll, the events get updated acordingly. In resume, if I move a couple of months back and forth, everything works like a charm.
I thought by reading the documentation that I should trigger Calendar.invalidateDecorators() to refresh the decorators shown, but if I do it, the app crashes complaining of OOM. So I am wondering, what does the calendar do when I scroll to months that is different from this function and how can I trigger it manually.
Thanks