Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Menuinflater shows menu item on the bottom not in the actionbar.

45 views
Skip to first unread message

Maikel Sibbald

unread,
Jan 14, 2015, 7:02:39 AM1/14/15
to actionba...@googlegroups.com
I'm trying to figure out how to but an extra menu item in the actionbar.

I've got these set:

getSupportActionBar().setCustomView(R.layout.actionbar_title);
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#ca0087")));

First I thought it was the custom view but when I comment it out. It's still on the bottom of the screen.


This is how in inflate the menu

@Override
    public boolean onCreateOptionsMenu(Menu menu) {

        MenuInflater inflater = getSupportMenuInflater();
        inflater.inflate(R.menu.refresh_menu, menu);


        return super.onCreateOptionsMenu(menu);
    }

Any idea what I'm doing wrong and why it's showing at the bottom of the screen?

Maikel Sibbald

unread,
Jan 14, 2015, 7:18:29 AM1/14/15
to actionba...@googlegroups.com
Aaah whoops.... uioptions the manifest....

Thanks anyways.
Reply all
Reply to author
Forward
0 new messages