Code example for FragmentActivity

Methods: onBackPressed

0
    @Override 
    public void onBackPressed() { 
    	if (menu != null && menu.isMenuShowing()) {
    		menu.showContent();
    	} else { 
    		super.onBackPressed(); 
    	} 
    } 
     
    public void attachSecondarySlidingMenu(){ 
    	if (menu != null){
    		menu.setMode(SlidingMenu.LEFT_RIGHT);
    		menu.setSecondaryMenu(R.layout.sliding_bookmarks);
    		menu.setSecondaryShadowDrawable(R.drawable.shadow_right);
    	} 
    } 
     
    public void attachSlidingMenu(){ 
    	attachSlidingMenu(null); 
    }