Search code examples
androidxmllayoutspinnerandroid-actionbar

Adding spinner to ActionBar (not Navigation


I have added a spinner to my ActionBar using the second option from the answer here .

How to I add a spinner adapter to the spinner? I tried using a Spinner object as Google describes here but get a null Spinner object.

Anybody know how to do this? I don't want the spinner to be in the navigation area of the action bar but in with the other action items (I am using the split action bar).

Thanks for the help!


Solution

  • Well, I ditched the Spinner idea for using a submenu. I realized that the spinner was for selecting things that stayed selected; submenus seamed to be a better UI fit.