Skip to content Skip to sidebar Skip to footer

Android Listview: Getview Being Called Multiple Times On Unobservable Views

(I have already seen this similar question) I have a ListView for which I've written a custom adapter, and an onitemclicklistener. I'm having an issue where, when any element of th

Solution 1:

Just by modifying the adapter via

mPicturesAdapter.setCurrentPicture(mPicture);

the ListView already tries to update itself. I'm guessing the onClick method will still do it's job without you calling notifyDataSetChanged

Solution 2:

Actually whatever List/Group you are using to populate the ListView, you need to first empty it and then recall it. For example, if you use ListA to populate the ListView, in the second or any consecutive update you need to empty the ListA first and then add items and then populate using it.

Solution 3:

if(convertView!=null){Thenpopulatelist}

Post a Comment for "Android Listview: Getview Being Called Multiple Times On Unobservable Views"