<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/theme_white_color"
    android:orientation="vertical"
    android:fitsSystemWindows="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <ImageView
            android:id="@+id/iv_top_bg"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scaleType="fitXY"
            android:src="@drawable/img_login_top_bg" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="@dimen/dp_20"
            android:layout_weight="1"
            android:orientation="vertical"
            android:paddingLeft="@dimen/dp_19"
            android:paddingRight="@dimen/dp_19">

            <TextView
                android:id="@+id/login_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:text="@string/user_login_welcome_login"
                android:textColor="@color/theme_color"
                android:textSize="@dimen/dp_20"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/tv_account_text"
                style="@style/user_login_edit_title_style"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="100dp"
                android:text="賬戶"
                android:visibility="gone"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/login_title" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_38"
                android:layout_marginTop="@dimen/dp_70"
                android:background="@drawable/shape_login_edit_border"
                app:layout_constraintLeft_toLeftOf="parent">

                <ImageView
                    android:id="@+id/iv_account"
                    android:layout_width="@dimen/dp_18"
                    android:layout_height="@dimen/dp_18"
                    android:layout_centerVertical="true"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:src="@drawable/ic_account" />

                <ImageView
                    android:id="@+id/iv_clear_account"
                    android:layout_width="@dimen/dp_30"
                    android:layout_height="@dimen/dp_30"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:padding="@dimen/dp_5"
                    android:src="@drawable/ic_clear_text"
                    android:visibility="gone" />

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/ed_login_user_account"
                    style="@style/user_login_edit_style"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_toLeftOf="@id/iv_clear_account"
                    android:layout_toRightOf="@id/iv_account"
                    android:hint="請輸入賬戶名或手機號"
                    android:maxLength="16"
                    android:maxLines="1"
                    android:paddingRight="@dimen/dp_10" />
            </RelativeLayout>


            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_38"
                android:layout_marginTop="@dimen/dp_15"
                android:background="@drawable/shape_login_edit_border"
                app:layout_constraintLeft_toLeftOf="parent">

                <ImageView
                    android:id="@+id/iv_pwd"
                    android:layout_width="@dimen/dp_18"
                    android:layout_height="@dimen/dp_18"
                    android:layout_centerVertical="true"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:src="@drawable/ic_pwd" />


                <ImageView
                    android:id="@+id/iv_clear_pwd"
                    android:layout_width="@dimen/dp_30"
                    android:layout_height="@dimen/dp_30"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:padding="@dimen/dp_5"
                    android:src="@drawable/ic_clear_text"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@id/ed_login_user_pwd"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="@id/ed_login_user_pwd" />

                <ImageView
                    android:id="@+id/ic_look_pwd"
                    android:layout_width="@dimen/dp_30"
                    android:layout_height="@dimen/dp_30"
                    android:layout_centerVertical="true"
                    android:layout_toLeftOf="@id/iv_clear_pwd"
                    android:padding="@dimen/dp_5"
                    android:src="@mipmap/ic_password_hide"
                    android:visibility="gone" />

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/ed_login_user_pwd"
                    style="@style/user_login_edit_style"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_10"
                    android:layout_toLeftOf="@id/ic_look_pwd"
                    android:layout_toRightOf="@id/iv_pwd"
                    android:hint="輸入6~20個字符"
                    android:inputType="textPassword"
                    android:maxLength="20"
                    android:maxLines="1"
                    android:paddingRight="@dimen/dp_10" />
            </RelativeLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_15"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <CheckBox
                    android:id="@+id/rb_auto_login"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:button="@drawable/selector_checkbox"
                    android:gravity="center_vertical"
                    android:text="自動登陸"
                    android:textColor="@color/color_86"
                    android:textSize="@dimen/sp_14" />

                <CheckBox
                    android:id="@+id/rb_remember_password"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_15"
                    android:button="@drawable/selector_checkbox"
                    android:gravity="center_vertical"
                    android:text="記住密碼"
                    android:textColor="@color/color_86"
                    android:textSize="@dimen/sp_14" />

                <TextView
                    android:id="@+id/tv_forget_pwd"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="忘記密碼?"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_16"
                    android:visibility="gone"
                    app:layout_constraintBottom_toBottomOf="@id/rb_auto_login"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/rb_auto_login"
                    app:layout_constraintTop_toTopOf="@id/rb_auto_login" />
            </LinearLayout>
        </LinearLayout>

        <com.qmuiteam.qmui.alpha.QMUIAlphaButton
            android:id="@+id/btn_gsa_user_login"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:layout_marginLeft="@dimen/dp_20"
            android:layout_marginTop="@dimen/dp_20"
            android:layout_marginRight="@dimen/dp_20"
            android:layout_marginBottom="@dimen/dp_60"
            android:background="@drawable/selector_login_btn"
            android:gravity="center"
            android:text="登錄"
            android:textColor="@color/white"
            android:textSize="@dimen/dp_16" />
    </LinearLayout>
</androidx.core.widget.NestedScrollView>

