I have to create few buttons imagebuttons programatically and i don't know how to change size of them. Changing left and right does not work.
Use this.
LinearLayout.LayoutParams params = button.getLayoutParams();
params.width = 80;
button.setLayoutParams(params);
it should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With