I have a ListView in which each List item has a Spinner. I have successfully added an OnItemSelectedListener to each spinner by implementing OnItemSelectedListener in the Activity and adding it in the GetView() of the adapter.
The problem is, I also have to implement OnItemClickListener for the ListView in the Activity. I have done that, but the event is not getting fired for the Item Click on normal list items. But, it is getting fired for the list section headers(which do not have the spinners).
How can I trigger the event for the List items as well?
Try this,
add the below property to your Spinner element,
The problem is because spinner is a element with clickable property, which will take the control of your click events and hence your listview wont get the chance to handle the click events. By adding the above property you can make both the spinner and your listview to get worked.
If it still doesn’t work then try adding this to the top most layout of your listview element xml ,