EditText in android
- EditText in android is works as Text field.
- You can get the data from the user.
- Android gives facility to enter different type of data as per the requirement.
- Two ways to create EditText in android
- Using xml file in layout
<EditText
android:id="@+id/hello"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="this is hint" />
- Using java code in activity class
EditText tvDynamic = new EditText (this);
tvDynamic.setText("---> Dynamically created EditText ");
- Types of EditText in android
- Simple EditText
- Password EditText
- android:inputType="textPassword"
- Number EditText
- android:inputType="number"
- Password EditText
- android:inputType="textPassword"
- Email EditText
- android:inputType="textEmailAddress"
- MultiLine EditText
- android:inputType="textMultiLine"
- Number EditText
- android:inputType="phone"
- Time EditText
- android:inputType="time"
- Date EditText
- android:inputType="date"
- Number Signed EditText
- android:inputType="numberSigned"
Related links :
- List of Android tutorial
- TextView demo tutorial in android download
- Button demo tutorial in android download
- Android - IDE(AIDE) let you allow to develop android application without PC or eclipse.
- How to create dynamic listview with images in android ?
- Android mobile hidden tricks and tips, android hidden codes
Tidak ada komentar:
Posting Komentar