android - Adapter converView sometimes null -
i have listview , adapter. simple getview
code found below.
public view getview(final int position, view convertview, viewgroup parent) { if (convertview == null) { log.d("mzule", "convertview null " + position); convertview = minflater.inflate(r.layout.item_cheap_layout, null); } return convertview; }
when build , run app. got logs below.
d/mzule (25020): converview null 0 d/mzule (25020): converview null 1 d/mzule (25020): converview null 2 d/mzule (25020): converview null 3 d/mzule (25020): converview null 4 d/mzule (25020): converview null 5 d/mzule (25020): converview null 16 d/mzule (25020): converview null 32 d/mzule (25020): converview null 47 d/mzule (25020): converview null 38
it obvious previous 6 converviews null. not figure out why 16th, 32nd, 47th , 38th convertview null. make listview laggy.
take @ here. explaination how listview's recycling mechanism works.
Comments
Post a Comment