Reputation: 2702
how to handle secondary menu open events while using SlidingMenu library in left_right mode i found code for OpenListener for BehindContentView menu
getSlidingMenu().setOnOpenListener(new OnOpenListener() {
@Override
public void onOpen() {
// TODO Auto-generated method stub
Toast.makeText(MainActivity.this,"left menu",Toast.LENGTH_SHORT).show();
}
});
How i add similar listener for secondary menu?
Upvotes: 0
Views: 2115
Reputation: 6319
Pretty much the same..
/**
* Sets the OnOpenListner for secondary menu {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the secondary SlidingMenu is opened
*
* @param listener the new OnOpenListener
*/
public void setSecondaryOnOpenListner(OnOpenListener listener) {
mSecondaryOpenListner = listener;
}
Upvotes: 1