Code example for ActionBar.LayoutParams

0
		startAct.setText("Start Activity");
 
		// defining the layout in code instead of XML 
		LinearLayout layout = new LinearLayout(this);
		layout.addView(startAct, new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.WRAP_CONTENT));
 
		// activating the button 
		startAct.setOnClickListener(new ButtonHandler());
 
		// setting the view to our layout 
		setContentView(layout);
	} 
 
	private class ButtonHandler implements View.OnClickListener {
		public void onClick(View v) {
			handleButtonClick(); 
		} 
	} 
 
	private void handleButtonClick() {