Code example for ActionBar.LayoutParams

0
		// Create button 
		btnReset = new Button(context);
		btnReset.setText("New Game");
		 
		// Put button on the layout 
		params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
		btnReset.setLayoutParams(params);
		 
		// Set onClick Event for the button 
		btnReset.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				// Resets the screen after the button is clicked 
				path.reset();
				// Calls the onDraw() method 
				postInvalidate();
			} 
		}); 
	} 
	 
	 
	@Override