There was some progress made to the earlier problem. Now there is a new problem. The text in the GridView shows the correct result. However, the images are the same as at th
First refactor your code. Create a class that holds name, picture and other friend data together.
class Friend {
public String name;
public String picture;
... /* more members and access methods*/
};
Then modify your adapter and filtering code accordingly.
FilterResults should contain the ArrayList, i.e. a list of Friend objects and not just the names.
In Adapter, replace
List
List
with
List
Change the getView method to access data from the friendsList object list.
After these changes the code will look better and work better.
Make sure your adapter's getItem method returns a Friend object
public Object getItem(int position) {
return mFriendsList.get(position);
}