Code example for LinearLayout.LayoutParams

Methods: setMargins

0
	 * @param listener 
	 */ 
	public void setPositive1Button(String text, final View.OnClickListener listener)
	{ 
		Button button=new Button(mContext);
		LinearLayout.LayoutParams params=new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
		params.setMargins(mMargins, 0, mMargins, 0);
		button.setLayoutParams(params);
		//button.setBackgroundResource(R.drawable.alertdialog_button); 
		button.setText(text);
		button.setTextColor(Color.BLACK); //0xff4d4d4d
		button.setTextSize(20);
		button.setOnClickListener(listener);
		mButtonLayout.addView(button);
	} 
	 
	/** 
	 * ���ð�ť 
	 * @param text 
	 * @param listener 
Stop searching for code, let great code find you!  Add Codota to your java IDE