Unexpected behaviour from getView() of CustomAdapter

后端 未结 1 1030
北荒
北荒 2021-01-25 10:35

Iam having a ViewHolder class like this

    static class ViewHolder {
    protected String fileName;
    protected Bitmap bitmap = null;
    protect         


        
相关标签:
1条回答
  • 2021-01-25 11:15

    Seems that when you don't use this workaround, Android has to resize the listview's layout several times until it's performed. That's why there's many users complaining about getView() being called more times than it "should".

    Anyway, be conscious that getView() is not called secuentially, it's called in the order that Android determines, so don't expect to be tags shown in order.

    --- EDIT ---

    And here comes the confirmation, page 48. Hope this helps!

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