1
score
200
views
no
status
CC BY-SA 3.0
get id of an item in spinner
Make a separate integer-array in XML for the ids: Get the int array in code: Using the position get the correct id from the array in onItemSelected :
Technical answers from my Stack Overflow history, with source links and licenses.
Showing 1 of 1 answer tagged android-spinner
Exported May 9, 2026
Make a separate integer-array in XML for the ids: Get the int array in code: Using the position get the correct id from the array in onItemSelected :