Skip to content Skip to sidebar Skip to footer

Using Spinner In A List Item Does Not Trigger The Onitemclik

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

Solution 1:

Try this,

add the below property to your Spinner element,

android:focusable=false

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 ,

android:descendantFocussability=blocksDescendants 

Post a Comment for "Using Spinner In A List Item Does Not Trigger The Onitemclik"