I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 9d0858ad authored by str4d's avatar str4d
Browse files

Override method for when nav drawer opens/closes to hide/show action bar items

parent 480dacb7
No related branches found
No related tags found
No related merge requests found
......@@ -79,10 +79,15 @@ public class I2PActivityBase extends ActionBarActivity {
public boolean onPrepareOptionsMenu(Menu menu) {
// If the nav drawer is open, hide action items related to the content view
boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);
//menu.findItem(R.id.action_add_to_addressbook).setVisible(!drawerOpen);
onDrawerChange(drawerOpen);
return super.onPrepareOptionsMenu(menu);
}
protected void onDrawerChange(boolean drawerOpen) {
// Override in subclass with e.g.
//menu.findItem(R.id.action_add_to_addressbook).setVisible(!drawerOpen);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// The action bar home/up action should open or close the drawer.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment