CursorAdapter bindView optimization

后端 未结 2 537
渐次进展
渐次进展 2020-12-14 03:23

When overriding ArrayAdapter I know is correct using a pattern like this:

if(view != null){
   ...create new view setting fields from data 
}else
  return vi         


        
2条回答
  •  無奈伤痛
    2020-12-14 04:10

    Yes, getView is in Adapter and is not dependant from ArrayAdapter nor CursorAdapter.

    recycling is always a good practice. Ensure that your code sets a colour in every situation.

提交回复
热议问题