I have a button with dimensions:
btn1.width = 100;
btn2.height = 150;
I used the following code to resize:
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) btn1.getLayoutParams();
layoutParams.width = 200;
layoutParams.height = 300;
btn1.setLayoutParams(layoutParams);
When I did this:
int newSize = btn1.getWidth;
The newSize has value 100, but not 200. It resized the button well, but after the resize, btn1.getWidth
still holds the previous value. How can I instantly get the set size?