Using API21+ Toolbar:
Toolbar
// Toolbar Toolbar toolbar = new Toolbar(this); toolbar.showOverflowMenu();
Would like to remove its shadow
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { appBarLayout.outlineProvider = null }