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;

Comments

Popular posts from this blog

Mastering API Development: Why Postman Reigns Supreme Over Swagger

Email Address Validation

Flutter web view