Shortly, I have a slide menu and I want it should only show menu when user press on menu button instead of sliding from left -> right (or right to left).
My menu config
This will disable swiping:
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
And this will make the menu toggle on clicking on the app icon in the action bar
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
getSlidingMenu().toggle();
return true;
}
return super.onOptionsItemSelected(item);
}