Android 3.0 CalendarView

前端 未结 1 401
感动是毒
感动是毒 2021-01-02 11:54

I\'m trying to implement a CalendarView, it takes an absurd amount of time (about 10 seconds) to appear on screen and it only loads the month and weekday headers, it does no

相关标签:
1条回答
  • 2021-01-02 12:20

    The tracing helped reveal that GregorianCalendar was being called thousands of times. It seems that when the calendar days aren't visible, it tries to calculate all of the dates rather than just the visible ones.

    The issue of the CalendarView only displaying the header information was solved by setting the layout_width and layout_height explicitly. Neither wrap_content or match_parent worked properly to display the calendar contents.

    0 讨论(0)
提交回复
热议问题