How To Set And Get The Id For The Items In The Spinner In Android
I have a problem like I had a Spinner containing the Names of all developers working in the Company. I have used the ArrayAdapter with a Array having the names of all the developer
Solution 1:
When you perform setOnItemSelectedListener on the spinner then you have method such as
publicvoidonItemSelected(AdapterView<?> adapterView, View view,
int position, long id){}
here you can findout the position of selected developer name of spinner and use this position to fetch data from array.
Post a Comment for "How To Set And Get The Id For The Items In The Spinner In Android"