<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:binding="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="RtlHardcoded">

    <data>

        <variable
            name="viewModel"
            type="com.hongyegroup.cpt_auth.mvvm.vm.UserRegisterViewModel" />

        <variable
            name="click"
            type="com.hongyegroup.cpt_auth.ui.UserRegisterActivity.ClickProxy" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/page_bg"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:orientation="vertical">

        <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:Easy_title="注册账号" />

        <com.guadou.lib_baselib.font_text_view.TextViewMedium
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_45dp"
            android:layout_marginLeft="@dimen/d_15dp"
            android:layout_marginRight="@dimen/d_15dp"
            android:gravity="center_vertical"
            android:text="请执行以下操作，完成账号注册"
            android:textColor="@color/gray_88"
            android:textSize="@dimen/d_14sp" />

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_1dp"
            android:background="@color/light_gray_divider" />

        <!--   手机号码     -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_48dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/d_15dp"
            android:paddingRight="@dimen/d_15dp">

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="手机号"
                android:textColor="@color/black_33" />

            <EditText
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="5"
                android:background="@null"
                android:hint="请输入您的手机号"
                android:inputType="phone"
                android:singleLine="true"
                android:text="@={viewModel.MPhoneNumLD}"
                android:textColor="@color/black_33"
                android:textSize="@dimen/d_15sp"
                binding:typefaceMedium="@{true}" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_1dp"
            android:layout_marginLeft="@dimen/d_15dp"
            android:background="@color/light_gray_divider" />

        <!-- 验证码 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_48dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/d_15dp"
            android:paddingRight="@dimen/d_15dp">

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="验证码"
                android:textColor="@color/black_33" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="5">

                <EditText
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@null"
                    android:hint="请输入验证码"
                    android:inputType="number"
                    android:singleLine="true"
                    android:text="@={viewModel.MVerityCodeLD}"
                    android:textColor="@color/black_33"
                    android:textSize="@dimen/d_15sp"
                    binding:typefaceMedium="@{true}" />

                <com.guadou.lib_baselib.font_text_view.TextViewMedium
                    android:id="@+id/tv_get_code"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@drawable/shape_blue_round3_border"
                    android:paddingLeft="@dimen/d_25dp"
                    android:paddingTop="@dimen/d_8dp"
                    android:paddingRight="@dimen/d_25dp"
                    android:paddingBottom="@dimen/d_8dp"
                    android:text="获取验证码"
                    android:textColor="@color/app_blue"
                    android:textSize="@dimen/d_13sp"
                    binding:clicks="@{click.getVerityCode}" />

            </LinearLayout>


        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_1dp"
            android:layout_marginLeft="@dimen/d_15dp"
            android:background="@color/light_gray_divider" />

        <!-- 新密码 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_48dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/d_15dp"
            android:paddingRight="@dimen/d_15dp">

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="新密码"
                android:textColor="@color/black_33" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="5">

                <EditText
                    android:id="@+id/et_password"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@null"
                    android:hint="最少8位数，包含大小写和数字"
                    android:inputType="textPassword"
                    android:singleLine="true"
                    android:text="@={viewModel.MPasswordLD}"
                    android:textColor="@color/black_33"
                    android:textSize="@dimen/d_15sp"
                    binding:typefaceMedium="@{true}" />

                <CheckBox
                    android:id="@+id/cb_psd"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_10dp"
                    android:button="@drawable/selector_check_password_hide" />

            </LinearLayout>


        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_1dp"
            android:layout_marginLeft="@dimen/d_15dp"
            android:background="@color/light_gray_divider" />

        <!--   邀请码     -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_48dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/d_15dp"
            android:paddingRight="@dimen/d_15dp">

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="邀请码"
                android:textColor="@color/black_33" />

            <EditText
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="5"
                android:background="@null"
                android:hint="请输入6位邀请码（非必填）"
                android:singleLine="true"
                android:text="@={viewModel.MInviteCodeLD}"
                android:textColor="@color/black_33"
                android:textSize="@dimen/d_15sp"
                binding:typefaceMedium="@{true}" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_1dp"
            android:background="@color/light_gray_divider" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_45dp"
            android:layout_marginLeft="@dimen/d_28dp"
            android:layout_marginTop="@dimen/d_60dp"
            android:layout_marginRight="@dimen/d_28dp"
            android:background="@drawable/selector_blue_btn_bg_round5"
            android:text="注册"
            android:textColor="@color/white"
            android:textSize="@dimen/d_17sp"
            binding:clicks="@{click.doRegist}"
            binding:typefaceBold="@{true}" />

    </LinearLayout>

</layout>
