Android Tutorial

(avery) #1
Android Tutorial 161

android:text=”@string/mand_default”
android:layout_width=”fill_parent”
android:singleLine=”true” />
<TextView
android:id=”@+id/TextView02”
style=”@style/optional_text_field_style”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”@string/opt_label” />
<EditText
android:id=”@+id/EditText02”
style=”@style/optional_text_field_style”
android:layout_height=”wrap_content”
android:text=”@string/opt_default”
android:singleLine=”true”
android:layout_width=”fill_parent” />
<TextView
android:id=”@+id/TextView03”
style=”@style/optional_text_field_style”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”@string/opt_label” />
<EditText
android:id=”@+id/EditText03”
style=”@style/optional_text_field_style”
android:layout_height=”wrap_content”
android:text=”@string/opt_default”
android:singleLine=”true”
android:layout_width=”fill_parent” />



The resulting layout has three fields, each made up of one
TextView for the label and one EditText where the user can input
text. The mandatory style is applied to the mandatory label and
text entry. The other two fields use the optional style. The resulting
layout would look something like Figure.
Free download pdf