Code example for LinearLayout.LayoutParams

Methods: setMargins

0
		// TODO Auto-generated constructor stub 
	} 
 
	public ColorButtonTextView(Context context) {
		super(context);
		this.textViewParams = new LayoutParams(100, 100);
		this.textViewParams.setMargins(2, 2, 2, 2);
		this.setLayoutParams(textViewParams);
		this.setWidth(100);
		this.setHeight(100);
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java