作業一

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:layout_height="300dp"
android:background="#4AC23D"
android:layout_margin="50dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#DF2727"
android:layout_weight="1"
android:orientation="horizontal">
<View
android:id="@+id/s_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#B552E9"
android:layout_weight="1"/>
<View
android:id="@+id/s_2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#DBDB9E"
android:layout_weight="1"/>
<View
android:id="@+id/s_3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#115DFC"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#EB2323"
android:layout_weight="1">
<View
android:id="@+id/s_4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#0E0D0D"
android:layout_weight="1"/>
<View
android:id="@+id/s_5"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#E91DC6"
android:layout_weight="1"/>
<View
android:id="@+id/s_6"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#EEE5CC"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#C206EE"
android:layout_weight="1">
<View
android:id="@+id/s_7"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#0AF00A"
android:layout_weight="1"/>
<View
android:id="@+id/s_8"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#FFFF00"
android:layout_weight="1"/>
<View
android:id="@+id/s_9"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#115DFC"
android:layout_weight="1
.作業三
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#01DFD7"
android:layout_margin="15dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#FFB90F"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:background="#EEAEEE"
android:orientation="horizontal">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#F300BCD4"/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:background="#90F48F36"/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#D800BCD4"/>
</LinearLayout>>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#2542FB2D"/>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical">
<TextView
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="使用者"
android:textSize="24sp"
android:layout_margin="10dp"
android:padding="10dp"/>
<TextView
android:id="@+id/tv_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="密碼"
android:textSize="24sp"
android:layout_margin="10dp"
android:padding="10dp"
android:layout_below="@id/tv_1"/>
<EditText
android:id="@+id/et_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:hint="請輸入使用者名"
android:textColor="#000000"
android:textSize="24sp"
android:layout_margin="10dp"
android:padding="10dp"
android:background="@drawable/et_1"
android:layout_toRightOf="@id/tv_1"
android:drawableLeft="@drawable/user1"
android:drawablePadding="10dp"/>
<EditText
android:id="@+id/et_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_1"
android:layout_centerVertical="true"
android:hint="請輸入密碼"
android:textColor="#000000"
android:textSize="24sp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:padding="10dp"
android:background="@drawable/et_1"
android:layout_toRightOf="@id/tv_2"
android:drawableLeft="@drawable/pas"
android:drawablePadding="10dp"
android:inputType="textPassword"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/et_2"
android:layout_centerHorizontal="true"
android:layout_margin="20dp"
android:padding="10dp"
android:text="登入"
android:textSize="24sp"
android:background="#009688"/>
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_above="@id/et_1"
android:layout_centerInParent="true"
android:layout_marginBottom="30dp"
android:src="@drawable/qmt"/>
</RelativeLayout>