Code example for FragmentActivity

Methods: onBackPressed

0
        //Close the menu on back press if it is open. 
 
        if(mIsLayoutShown){
			toggleMenu(); 
		}else{ 
			super.onBackPressed(); 
		} 
	} 
 
    /** 
     * Sets the position of the right hand side of the menu. 
     * @param right 
     */ 
	public void setMenuRightPosition(float right){
	 
		FrameLayout menu = (FrameLayout) findViewById(R.id.ws_munday_slidingmenu_menu_frame);
		FrameLayout root = (FrameLayout) findViewById(R.id.ws_munday_slidingmenu_content_frame);
		menu.setVisibility(View.VISIBLE);
		 
		//update sizes and margins for sliding menu 
		RelativeLayout.LayoutParams mp = new RelativeLayout.LayoutParams(mMenuWidth,RelativeLayout.LayoutParams.MATCH_PARENT);