Saturday, 3 July 2010

Some examples of inputType on EditText

Some examples of InputType on EditText

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Ordinary EditText"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Password"
/>
<EditText
android:password="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Multi-ine"
/>
<EditText
android:inputType="text|textMultiLine"
android:minLines="3"
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Date"
/>
<EditText
android:inputType="date"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Signed Decimal Number"
/>
<EditText
android:inputType="number|numberSigned|numberDecimal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>




No comments:

Post a Comment