|
<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/txt1" |
|
android:layout_width="fill_parent" |
|
android:layout_height="wrap_content" |
|
android:autoText="false" |
|
android:text="@string/hello_world" |
|
/> |
|
|
|
<EditText |
|
android:id="@+id/editText" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:ems="10" |
|
android:inputType="textPersonName" |
|
android:layout_marginTop="29dp" |
|
android:hint="請輸入姓名" |
|
android:layout_below="@+id/txt1" |
|
android:layout_centerHorizontal="true" /> |
|
|
|
<TextView |
|
android:id="@+id/textView" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="帳號" |
|
android:textAppearance="?android:attr/textAppearanceLarge" |
|
android:layout_alignBaseline="@+id/editText" |
|
android:layout_alignBottom="@+id/editText" |
|
android:layout_alignParentStart="true" /> |
|
|
|
|
|
<CheckBox |
|
android:id="@+id/checkBox1" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:checked="false" |
|
android:text="寫程式" |
|
android:textSize="@dimen/abc_text_size_small_material" |
|
android:layout_below="@+id/editText" |
|
android:layout_alignParentStart="true" |
|
android:layout_marginTop="27dp" /> |
|
|
|
<CheckBox |
|
android:id="@+id/checkBox2" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:layout_alignTop="@+id/checkBox1" |
|
android:layout_marginStart="23dp" |
|
android:layout_toEndOf="@+id/checkBox1" |
|
android:checked="false" |
|
android:text="聽音樂" /> |
|
|
|
<CheckBox |
|
android:id="@+id/checkBox3" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:layout_alignBottom="@+id/checkBox2" |
|
android:layout_marginStart="30dp" |
|
android:layout_toEndOf="@+id/checkBox2" |
|
android:checked="false" |
|
android:text="看書" /> |
|
|
|
<Button |
|
android:id="@+id/button1" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:text="顯示" |
|
android:layout_centerVertical="true" |
|
android:layout_alignParentStart="true" /> |
|
|
|
<Button |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:text="清除" |
|
android:id="@+id/btnclear" |
|
android:layout_below="@+id/button1" |
|
android:layout_alignParentStart="true" /> |
|
<TextView |
|
android:id="@+id/textView4" |
|
android:layout_width="fill_parent" |
|
android:layout_height="wrap_content" |
|
android:textColor="#405dff" |
|
android:layout_below="@+id/rGroup" |
|
android:layout_alignParentStart="true" |
|
android:layout_alignParentBottom="true" /> |
|
|
|
<RadioGroup |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:layout_below="@+id/btnclear" |
|
android:layout_alignParentStart="true" |
|
android:id="@+id/rGroup" |
|
android:visibility="invisible"> |
|
|
|
<RadioButton |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="show msg" |
|
android:id="@+id/radioButton1" |
|
android:checked="true" |
|
/> |
|
|
|
<RadioButton |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="Hide msg" |
|
android:id="@+id/radioButton2" |
|
android:layout_below="@+id/btnclear" |
|
android:layout_alignParentStart="true" |
|
android:checked="false" |
|
/> |
|
</RadioGroup> |
|
|
|
<CheckBox |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="運動 " |
|
android:id="@+id/checkBox4" |
|
android:layout_below="@+id/checkBox1" |
|
android:layout_alignParentStart="true" |
|
android:checked="false" /> |
|
|
|
<CheckBox |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="睡覺" |
|
android:id="@+id/checkBox5" |
|
android:checked="false" |
|
android:layout_below="@+id/checkBox2" |
|
android:layout_alignStart="@+id/checkBox2" /> |
|
|
|
<CheckBox |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text="看電影" |
|
android:id="@+id/checkBox6" |
|
android:checked="false" |
|
android:layout_below="@+id/checkBox3" |
|
android:layout_toEndOf="@+id/checkBox5" |
|
android:layout_alignStart="@+id/checkBox3" /> |
|
|
|
|
|
</RelativeLayout> |