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
Events on day 1 of the month doesn't appear #12
Comments
Seeing day events from another month should not happen. No matter when it's loaded. As long as the date you use is correct. E.g. If you want to add events for next month. The epochTime you pass in should be for next month. CompactCalendarView does not use the current month for any date calculations. If these conditions are met then this indicates some problem. Unfortunately, I cannot fix these problems until at least a week since I'm going off on holiday. So no commits until I'm back :(. |
SundeepK, thanks for your answer!
So at moment this problem is not so important :-)
When i get the data from my server, first i cicle on all events and i call the "addEvent" method ... after that i call the SetCurrentDate ... so i do this only 1 time also with 100 events ;-) Don't worry for the fix ... and have a nice holiday! Thanks for your library! |
Umm interesting. I will look into this when I have the time. Did you try invalidate() method to refresh the view? |
This works!!! |
No problem. I will look into these other problems you have noticed. I'm guessing the java calendar is getting in some inconsistent state when you call setDate() after adding some events. Java Calendar class is such a pain to use :(. |
Yes i know! |
Hi,
i've imported your beautiful calendar in my project. I need to show events on it and the official one from Google doesn't have this feature,
It works well but i want to signal you some issue i found :
On day 1 the small indicator is not shown. why?:
if(!isSameDayAsCurrentDay && dayOfMonth != 1){
I'm getting the events from my server via Volley. So when i receive a respose ( async process ) i add event with this line of code ( calendar is already created in the activity ).
context.compactCalendarView.addEvent(new CalendarDayEvent(nb.getDate().getTime(), Color.argb(255, 0, 0, 0)));
I do this on every month change event!
But at first render the small indicators are not present. Only if i touch the calendar or try to slide it they appears!
To avoid it i've added this line of code after all "addEvent" :
context.compactCalendarView.setCurrentDate(new Date());
This is for me a way to "refresh" the calendar.
This works only for the first time ... on subsequently month change it creates some problems to the visualization of the days in the calendar ( ex: i'm in July but i see day and events of another month )
I think that the problem is due to the fact that i get data in a second moment an not in the activity when the calendar is created.
Do you have any suggestions?
Thanks!
The text was updated successfully, but these errors were encountered: