Code example for ActionBar.LayoutParams

0
		brush.setStyle(Paint.Style.STROKE);
		brush.setStrokeJoin(Paint.Join.ROUND);
		brush.setStrokeWidth(6f);
		btnEraseAll= new Button(context);
		btnEraseAll.setText("erase all");
		params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
		btnEraseAll.setLayoutParams(params);
		btnEraseAll.setOnClickListener(new View.OnClickListener() {
	             
	            @Override 
	            public void onClick(View view) {
	                //reset the path 
	                path.reset();
	                //invalidate the view 
	                postInvalidate();
	                 
	            } 
	        }); 
		 
		 
Experience pair programming with AI  Get Codota for Java