So, I have an ArrayList that has name and id
Gil 232
Asty 2423 and so on.
To use it in the spinner, what I did was to create two separate String Arraylists. One containing the names and the other the corresponding ids. So, that once the user is selected, I will get the corresponding id from the position.
I am not sure how to do that last part. As to, how to get the position?> parent.getItemAtPosition(pos).toString();
This gives me the name again and not the position of the name in the ArrayList which I can use to retrieve the ID from the other list. How to do it? And, is their a better way to go about it?