How to make EditText smaller than default?
Posted
by Heikki Toivonen
on Stack Overflow
See other posts from Stack Overflow
or by Heikki Toivonen
Published on 2009-03-17T05:21:25Z
Indexed on
2010/05/02
9:17 UTC
Read the original article
Hit count: 187
android
I need to show a large number of EditText controls on a screen, each of which will only allow entering 0-2 digits. The default EditText size is too wide for me to show enough EditText controls on a screen, but I have been unable to figure out how to make them narrower. I have tried the following attributes in XML: android:maxLength="2" android:layout_width="20dip" android:maxWidth="20px" android:ems="2" android:maxEms="2". So the question is: how can EditText be made smaller than default?
© Stack Overflow or respective owner