<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/bmi_height" />
<EditText
android:id="@+id/height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:inputType="numberDecimal"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/weight"
android:layout_below="@+id/height"
android:text="@string/bmi_weight" />
<EditText
android:id="@+id/weight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/height"
android:layout_below="@+id/textView2"
android:inputType="numberDecimal"
android:ems="10" />
<Button
android:id="@+id/submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/weight"
android:layout_below="@+id/weight"
android:text="@string/bmi_btn" />
<TextView
android:id="@+id/result"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/submit"
android:layout_below="@+id/submit"
android:text="@string/bmi_result"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/suggest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/result"
android:layout_below="@+id/result"
android:text="@string/bmi_suggest"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/bmi_height" />
<EditText
android:id="@+id/height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:inputType="numberDecimal"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/weight"
android:layout_below="@+id/height"
android:text="@string/bmi_weight" />
<EditText
android:id="@+id/weight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/height"
android:layout_below="@+id/textView2"
android:inputType="numberDecimal"
android:ems="10" />
<Button
android:id="@+id/submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/weight"
android:layout_below="@+id/weight"
android:text="@string/bmi_btn" />
<TextView
android:id="@+id/result"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/submit"
android:layout_below="@+id/submit"
android:text="@string/bmi_result"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/suggest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/result"
android:layout_below="@+id/result"
android:text="@string/bmi_suggest"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
最後修改紀錄: 2014年 04月 2日(三.) 09:54