How to set a size for Edittext text box?

Asked

Viewed 2,615 times

1

How to set a size for text box EditText to make a square

  • Define the layout_width equal to layout_height doesn’t work? Or you want it to be square to any dimension (variable)?

1 answer

1


Try to do this:

final LayoutParams layoutParams = new LayoutParams(50,50); // Largura, Altura
seuEditText.setLayoutParams(layoutParams);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.