1

I have an existing setup working where overflow menu is shown in the toolbar. What I want to do is show two menus, one for the toolbar and one to be used inside the fragment kind of like gmail app

one menu for the taskbar/toolbar and one for the email message

If someone can point me out to a tutorial for this, that would be great!

2 Answers2

1

You've to use the Popup Menu. Take a look at the official docs for detailed instructions.

Srikar Reddy
  • 3,650
  • 4
  • 36
  • 58
0

You could use the Toolbar component. It allows you to duplicate the ActionBar behavior anywhere. Here's a similar question that solves that specific problem: How to set menu to Toolbar in Android

Also watch out for this: Toolbar.inflateMenu seems to do nothing

Inflate the menu from zero via Toolbar#inflateMenu(int) and update it via Toolbar#getMenu()

Community
  • 1
  • 1
milosmns
  • 3,595
  • 4
  • 36
  • 48