Code example for RelativeLayout

Methods: getLayoutParams, setLayoutParams, startAnimation

0
		TranslateAnimation ta = new TranslateAnimation(0, -menuSizePx, 0, 0);
		ta.setDuration(ANIMATION_DURATION);
		menu.startAnimation(ta);
		ta = new TranslateAnimation(menuSizePx, 0, 0, 0);
		ta.setDuration(ANIMATION_DURATION);
		content.startAnimation(ta);
		android.widget.RelativeLayout.LayoutParams params = (android.widget.RelativeLayout.LayoutParams) content
				.getLayoutParams();
		params.setMargins(0, 0, 0, 0);
		content.setLayoutParams(params);
		menuShown = false;
	} 
 
	public void setMenuAdapter(ListAdapter a) {
		// menuList.setAdapter(a); 
		// mMenuView.setAdapter(new ArrayAdapter<String>(mAct, 
		// android.R.layout.simple_list_item_1, new String[] { "Item 1", 
		// "Item 2", "Item 3" })); 
	} 
 
Connect your IDE to all the code out there  Get Codota for Java