In android, I usually use MyAdapter extends ArrayAdapter
to create view for the ListView
, and as a result, I have to override the function
convertView
is used to reuse old view.
Please understand Adapter
functionality in android. Adapter
enables you to reuse some view with new data.
So if a list is of 15 items, but window can show only 5 items, then at first convertView
would be null, and we need to create new views for these five items, but when you scroll down, you have two options, either create 6-10 views, or re-use old views and load new data into these views.
Adapter
and convertView
enables you to do the later method.