android - Creating Separate OnClick Listeners for Left and Right Navigation Drawers -


i have 2 navigation drawers/menus:

enter image description here

however need little bit of setting onclick listener right action bar menu.

currently - have onclick listener left action bar menu

   @override         public boolean onoptionsitemselected(menuitem item) {               if (mdrawertoggle.onoptionsitemselected(item)) {                 return true;             }               return super.onoptionsitemselected(item);         } 

however i'm not sure how might able handle onclick event right action bar menu.

any suggestions appreciated.

full xml , java source:

http://pastebin.com/ygyyjtlz

try this:

 @override  public boolean onoptionsitemselected(menuitem item) {          if (mdrawertoggle.onoptionsitemselected(item)) {             return true;         } else {             switch (item.getitemid()) {                case r.id.action_more: // change action_more own id in main.xml menu                  // stuff here (your right click method)                  return true;                // rest of menu actions here...            }         }          return super.onoptionsitemselected(item);  } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -