2

How can I add overflow menu without setSupportActionBar(toolbar) because when I'm doing like this overflow menu appears but then toolbar.setTitle(""); does not work along with other toolbar methods, and I have to setTitle and other things using getSupportActionBar();

If we have to set all things via actionbar then what is the need of toolbar?

Itchydon
  • 2,572
  • 6
  • 19
  • 33
blackHawk
  • 6,047
  • 13
  • 57
  • 100

1 Answers1

1

You can try this:

toolbar.inflateMenu(R.menu.yourmenu);

For menu item click use this:

toolbar.OnMenuItemClickListener()

And dont setSupportActionBar()

Bruno Ferreira
  • 1,561
  • 1
  • 10
  • 17