Set the height and width of layout, programmatically in android
Create the layout
LinearLayout linearLayout= (LinearLayout)findViewById(R.id.numberPadLayout);
Gets the layout params that will allow you to resize the layout
LayoutParams Lparams = linearLayout.getLayoutParams();
Changes the height and width by specified pixels
Lparams .height = 100;
Lparams .width = 100;
LinearLayout linearLayout= (LinearLayout)findViewById(R.id.numberPadLayout);
Gets the layout params that will allow you to resize the layout
LayoutParams Lparams = linearLayout.getLayoutParams();
Changes the height and width by specified pixels
Lparams .height = 100;
Lparams .width = 100;
Comments