When I click on the first item in the spinner, or the default one, the spinner just collapses. All other items perform desired action. How do I get the first item to fire an action?
You are having this problem (assuming you have implemented the setOnItemSelectedListener()
for the Spinner
) because Spinner
calls the onItemSelected()
only when you change the Selection, in other words select a new item in the Spinner
. Hence the Spinner
simply collapse when you select the default selection.
Hope this explanation helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.