I am using ActionBarCompat to create an action bar. I can display the dropdown navigation list in it with an ArrayAdapter. However, I want to attach an OnNavigationListener to it, and that is where I am having this problem: it has no effect. It only gets triggered one time when I attach it to the actionbar for the first time. Here is my OnNavigationListener implementation:
class RaditazActionBarListener implements ActionBar.OnNavigationListener {
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
Intent parentActivityIntent = new Intent(ctx, Player.class);
startActivity(parentActivityIntent);
return true;
}
And here is how I am attaching it to my action bar:
getActionBar().setListNavigationCallbacks(mySpinnerAdapter, new RaditazActionBarListener());
Any idea why the listener is not being triggered when I select items in the dropdown?
Thanks, Igor
Since there is no code for mySpinnerAdapter
it is hard to guess:
OnNavigationOtemSelected()
code)