Reputation: 9052
I'm very new to android and I want to reduce the size of EditText
field in my layout.
For example if the user only need to enter 3 digits to the text field, then the size of the EditText
should be small enough not the one provided by default.
Is that possible to do so?
Thanks in advance.
Upvotes: 0
Views: 2753
Reputation: 1
You can use android:layout_margin="size you want"
use can also use android:layout_margin_left="size you want"
instead of "left" you can also right, top, bottom.
Upvotes: 0
Reputation: 2731
Try like this..
android:layout_width="wrap_content"
or
android:layout_width="20dp" //size your choice
Upvotes: 1
Reputation: 5192
In your Layout file set the attribute to that text field width as
android:layout_width="wrap_content"
..This will take width
as the text content entered into the field
Upvotes: 0