I need to change the size of the buttons programmatically. I read some answers and I do the next to change the button size.
button.setLayoutParams(new RelativeLayout.LayoutParams(150, 50)); This code change the size correctly but the problem is that the button not stay in the position I want, it moves the button to the top left corner.
I need to change the button size but I don't want to change de position.
How can I fix this?