I added calendarview inside of the DialogFragment.
the problem is when i triggered fragment by clicking button, fragment didn't show up immediately.
(there's 1~2 sec pause till fragment shows. The dialog has only child (calendarview))
Hey @MinyoungJung, I've been trying to replicate this but can't. Could you code or a sample project you're using? Also, what device are you testing on?
Nevermind, I can reproduce this now.
@dandc87 Let me know if you need any help about this issue, thanks for your effort!
It looks like the time is just because of the many views that need to be created for all of the individual day tiles. A solution would be to remove DayView and WeekDayView and have MonthView responsible for drawing everything. This would significantly reduce the number of views, but increase the complexity of MonthView and the textAppearance attributes would have to work a bit differently.
@Jogan and @ireneduke what do you think? I feel it would be worth it.
+1
@dandc87 Not sure if related, but every now and then I get a StackOverflow while drawing the Calendar. I haven't been able to track it down since it happens vary rarely but I have a feeling that it has to do with the number of views.
Have the same issue. It is terribly slow in device (Samsung Core Plus). Looking at the ADM it seems at is related to Date and Calendar caluclations. Look at https://www.dropbox.com/s/wb93fibn4cgxfu3/Sk%C3%A4rmklipp%202015-07-30%2015.39.36.png?dl=0
Seems that CalendarDay.from() and GregorianCalendar.add() is the ones taking time. I assume then it's a bad implemented algoritm for setting up the dates et.c.
To keep this issue updated, version 0.8.0 should improve the issue a lot, but there is still noticeable lag.
View inflation is still slow, even on my LG G4.
This is definitely due to having individual views for each day. I've been doing some testing around having MonthView also draw days (instead of having children) and the view inflates _much_ faster.
Do you solved this problem? I have the same problem when using DialogFragment. I have Only 2 lines of text on this Dialog fragment. And it is also slow when show up. Takes like 2-3 seconds. I do not think it is the calendar's problem, maybe some problem in DialogFramgent.
Seems like having a mcv inside a dialog is now much faster to display. Tested the sample app using different devices on the 1.4.0 library version. Going to close this out soon unless people are still experiencing similar problems.
I'm still experiencing lag when using multiple MCVs inside a fragment. Days shouldn't require individual views, although I guess it'd take a long time to recreate the library's behaviour without individual DayViews.
You can check the setTypeface. I have the same issue when setTypeface.
Maybe it will solve your problem.
Memory consumption AND slow inflation are impossible to handle in the latest version of this library. A simple calendar (no decorators, no styles, just the view) can take in between 2 and 15 seconds to render its views depending on the used device (3.2 seconds on a Pixel... I mean... dude!). On the other side, memory spikes to in between 30MB and 40MB during rendering.
Most helpful comment
Memory consumption AND slow inflation are impossible to handle in the latest version of this library. A simple calendar (no decorators, no styles, just the view) can take in between 2 and 15 seconds to render its views depending on the used device (3.2 seconds on a Pixel... I mean... dude!). On the other side, memory spikes to in between 30MB and 40MB during rendering.