Android CalendarView slowing down layout

前端 未结 6 1346
生来不讨喜
生来不讨喜 2020-12-15 06:24

This is driving me crazy. I have a fragment in my Android app which is laid out using a RelativeLayout. Problem is that for some reason it takes ages to render, about 5 seco

6条回答
  •  孤街浪徒
    2020-12-15 07:21

    I've had this problem too, both with relative layouts and linear layouts. It doesn't seem to be layout-related.

    Here is an example to see the error, just with a simple layout, no code at all:

    
    
        
    
        
    
    
    

    And now just change the linear layout height to:

    android:layout_height="match_parent"
    

    With this change the problem is gone, at least in my Samsung Galaxy Tab 2

    So it seems it is more "space" related, but I'm still not sure why this problem appears. And I haven't found any other interesting results on google searching "calendarview slow"...

    EDIT Let's see if we can find an answer with a small bounty

提交回复
热议问题