EF's Blog

Android Tutorial : Change/Resize EditText UI

Posted on: May 9, 2012

Resizing a textfield using XML in Android is easy. Code snippet below.


< EditText
android:textSize="12px"
android:editable="true"
android:autoText="true"
android:maxLength="50"
android:singleLine="True"
android:layout_width="200px"
android:layout_height="20px"
/>


Size values are in float values and determined by px (pixels), sp (scaled pixels based on preferred font size), db (density-independent pixels), in (inches) and mm (millimeters).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

EF’s Blog

I'm just ordinary people who lived in an extra-ordinary world.

EF's Blog Stats

  • 126,562 hits
May 2012
M T W T F S S
« Apr   Jul »
 123456
78910111213
14151617181920
21222324252627
28293031  

Archives

%d bloggers like this: