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
I used this. The getView
runs twice, but if you check if convertView
is null
, the code inside will be run once.
public View getView(int position, View convertView, ViewGroup parent) {
View superView = super.getView(position, convertView, parent);
if (convertView == null)
{
// Customize superView here
}
return superView;
}