Resize Android UI EditText in XML

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).

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *