安卓開發學習筆記(七):仿寫騰訊QQ登入註冊介面
阿新 • • 發佈:2019-02-05
<?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:orientation="vertical"
android:background="@drawable/bg2"
>
<!--頭部內容-->
<RelativeLayout
android:layout_width ="match_parent"
android:layout_height="160dp"
android:padding="16dp"
android:layout_margin="0dp"
>
</RelativeLayout>
<!--輸入框-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content "
android:padding="16dp"
android:layout_margin="0dp"
>
<EditText
android:id="@+id/account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint ="QQ號/密碼/郵箱"/>
/>
<EditText
android:layout_below="@id/account"
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:password="true"
android:hint="密碼"/>
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="33dp"
android:padding="0dp"
android:layout_margin="0dp"
>
<CheckBox
android:id="@+id/remember_pass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="記住密碼"/>
</RelativeLayout>
<!--密碼功能-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp">
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登入"
android:textColor="#fff"
android:background="#008cc9"/>
<Button
android:id="@+id/forget_pwd"
android:layout_below="@id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="#2999ce"
android:gravity="start"
android:layout_marginTop="16dp"
android:textSize="16dp"
android:text="忘記密碼?"/>
<Button
android:id="@+id/register"
android:layout_below="@id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="#2999ce"
android:gravity="end"
android:text="新使用者註冊"
android:layout_marginTop="16dp"
android:textSize="16dp"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:padding="16dp"
android:layout_margin="0dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</LinearLayout>