In Android’s ListView widget, the ListView will hold the views which is got from getView method of an Adapter in a inner class RecycleBin.
How can I clear the views in the RecycleBin and force the ListView to recreate all the child views.
If I remember correctly a call to
invalidateon aListViewwidget will empty the cache ofViewswhich are currently stored. I would advise against emptying the cache of views of aListViewbecause of the potential performance issues.If you’re not going to use the
convertViewitem then you’ll end up with having to build the row view each time(resulting in a lot of objects constructed each time the user scrolls) + the extra memory occupied by the recycled views from theRecycleBinwhich will never be used anyway.