After a tremendous amount of time searching in here, and everywhere else I am hopeless to find a solution.
So here is my problem.
I have created a list-
As from my previously answered question here, you have to override the getItem(position)
method in your CustomAdapter
. You are setting the onItemClick
somewhat correctly but the list adapter doesn't know what exactly it's getting from getItem(position)
.
EDIT (details): You need to add something like this in your custom adapter -
@Override
public Object getItem(int position) {
return list.get(position);
}
You should already have the list
in your custom adapter. If not, you can add a list reference to your CustomAdapter
:
private ArrayList> list;
Then setting it using a setter in your Group
activity:
customAdapter.setList(searchResults);