How to include a common menu item in multiple menus in Android menu xml?

Inflating each menu and calling to super works great!
Here is an example:

@Override
public boolean onCreateOptionsMenu(Menu menu) 
{
    super.onCreateOptionsMenu(menu);
    getMenuInflater().inflate(R.menu.main, menu);
    getMenuInflater().inflate(R.menu.other, menu);
    return true;
}

You can control the order if super also adds more items by calling it before/after other inflates, or not call at all it to ignore those items.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)