Android: getView() called twice in custom adapter

前端 未结 4 1567
渐次进展
渐次进展 2021-02-13 04:53

I\'m setting a custom SimpleCursorAdapter to a ListView. For some reason FriendAdapter\'s getView() is called twice for every item in the DB. After some investigation (I have no

4条回答
  •  不知归路
    2021-02-13 05:27

    For me it seems like the view is created twice in the same method. One in "if(convertView==null)" and the other "else". If I did nothing in once of the if statements then it is only created once. It seems like the method itself is only called once though.

提交回复
热议问题