I’m having a ListView with my own custom adapter derived from a BaseAdapter. Each item in the ListView has sub items such as ImageView and TextView.
How can I know which one of these sub items the user clicked? Is it possible to attach a listener in the getView function for example, or could that be a problem?
/ Henrik
Edit: Currently I have a onItemClick in the Activity which contains the ListView. Is there any good way to know which sub item in a specific item in the ListView which has been pressed by checking the params in the onItemClick.
@Override
public void onItemClick(AdapterView<?> a, View v, int pos, long id) {
.
.
}
You can do it. You need to modify your getView method: