How do you retrieve the array adapter currently set for a spinner? Android OS, Droid

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2010-02-21T18:43:16Z Indexed on 2010/03/08 3:17 UTC
Read the original article Hit count: 307

Filed under:
|
|
|

Looking to create a menu toggle that switches between two possible arrays for a spinner. For example, if the spinner is set to show array A, then when I press this menu button, I want the spinner to be set to array B. If I press it again, I want it to be set back to array A.

I can handle the if/then statements and all, but how do I call the spinner's array adapter? I know how to call its value using getSelectedItemPosition(); but is there a similar method for retrieving WHICH array it is currently set to?

© Stack Overflow or respective owner

Related posts about droid

Related posts about spinner