Click here to Skip to main content
15,919,422 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

So, I am trying to use a spinner(DropDown list) and want to fetch the selected item id or value on a button click. Can any one please guide me with this. The data is given below. If I select My_Cube i want to fetch -121.97662563749999 something similar to spinner.getSelectedItemId(), but this does not work..

XML
<string name="Location_prompt">Choose a Location</string>
  <string-array name="Location_array">
      <item id="-121.97662563749999" value="-121.97662563749999">My_Cube</item>
      <item id="-121.97661005" value="-121.97661005">Conference_Room</item>
  </string-array>


Need help asap.

Thanks,
Jason
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900