-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After multiple load Material-Calendar-View shows the wrong day icon. #80
Comments
I have debugged some more, and can see that in this function:
The icon ID (eventDay.getImageResource()) is correct, but the calendar is loading the wrong one and not the one returned by "eventDay.getImageResource()" |
We have narrowed it down to a issue with Glide, probably its diskcache, clearing the cache greatly reduce how often the error happens. the reason why it still happens is probably that the clean runs in a backgroundtask and had not completed. I would strongly suggest that you update glide to its current version 4.7.0 |
Seems that my problem has been solved in Glide 4.4.0: "Fixed a couple of cases where calling load(Bitmap) or load(Drawable) could cause Glide to re-use or recycle the given Bitmap or Drawable (cff4f2c)." |
I forked the project, update glide to current version, implemented it in my project and the error is gone. I can therefore confirm that the error is in Glide and that updating the project to newest version of glide will solve this problem. Please close when you have confirmed that you will update to the latest version of glide, there where no breaking changes only thing needed is to push compilesdktarget to 27. |
Hi, I need to add a single dot below a date, Please tell me how to do that or an example will also be fine? I have no idea. |
@karthikslegend I am trying to add some events with an icon and it does not work. Nothing happens underneath I leave the code! Urgent help! |
The developer seems to not support this library anymore, i never got a answer to my question, i fixed it my self and are now running on a private branch to make sure that a update to this library wont break my own. Good luck fixing :) |
We will make more tests and probably remove Glide in one of next release if calendar will be working without any issues. Thank you for your effort. |
Hi.
I have debugged this issue for ages now, and can conclude that after multiple loads the calendar might show the wrong icon. I have 59 event days i load in to the calendar, they can have one of two icons.
In my activity i have a toggle functionality between two calendars "week" and "month", when i switch between these multiple times material calendar view will begin showing the wrong icons and at some point stop showing icons at all. I can recreate this very easy just by jumping from the week to the month calendar multiple times.
Everytime i change from month to week the fragment that holds the material calendar view gets destroyed and therefor its a complete fresh version that is failing. The eventdays im passing is hardcoded and cannot change, but i even debugged the calendar view adapter with a breakpoint in the seteventdays function and have concluded that the eventdays are correct, even dough the calendar shows the wrong icons and none at all. Something goes completely haywire when destroying and loading the calendar again.
Currently im in a state where the calendar view refuses to show any icons at all, even dough i pass 59 hardcoded eventdays to it.
This image shows the correct layout build from the eventdays:
This image shows the error after i changed between "dag (day)" and "måned (month)" 4 times, as you can see the one row of icons changed, the eventdays are exactly the same (hardcoded) this is also verified in the "seteventdays" in CalendarView where i can see that the eventdays do indeed have the correct icon, but the calendar shows them wrong anyways.
Please help.
Best Regards
Morten
The text was updated successfully, but these errors were encountered: