I\'ve created a Toolbar
for Lollipop, but I can\'t seem to figure out how to add an overflow button to the toolbar. I\'m not going to be using the v7 appcompat
If you want to add the item in the overflow menu you should set never
as android:showAsAction
. If you set always
the item will be an icon in the toolbar.
Edit your menu.xml
like this:
Also you need to call setActionBar()
. Edit initToolbar()
like this:
private void initToolbar() {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mToolbar.setTitleTextColor(Color.WHITE);
mToolbar.setTitle("gnappo");
mToolbar.showOverflowMenu();
setActionBar(mToolbar);
}