<?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:tools="http://schemas.android.com/tools" >

    <data >

        <import type="com.quansu.heifengwuliu.utils.MUiSwitch" />

        <variable
            name="vm"
            type="com.quansu.heifengwuliu.vmodel.LoginVModel" />

    </data >

    <LinearLayout
        android:name="com.ysnows.login.activity.LoginActivity"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:fitsSystemWindows="true"
        android:orientation="vertical"
        tools:context="com.quansu.heifengwuliu.activity.LoginActivity" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="140dp"
            android:layout_marginTop="12dp"
            android:layout_marginBottom="12dp"
            android:gravity="center"
            android:orientation="vertical" >

            <ImageView
                android:id="@+id/img_avatar"
                android:layout_width="70dp"
                android:layout_height="70dp"
                android:src="@mipmap/ic_launcher" />
            <TextView
                android:layout_width="wrap_content"
                android:layout_marginTop="10dp"
                android:text="物流平台"
                android:textSize="15sp"
                android:textColor="#4B3200"
                android:layout_height="wrap_content">
            </TextView>
        </LinearLayout >

        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginLeft="35dp"
            android:layout_marginRight="35dp"
            android:gravity="center_vertical"
            android:paddingStart="@dimen/dp_8"
            android:paddingEnd="@dimen/dp_14"
            app:rv_radius="25dp"
            app:qmui_borderColor="#F4F3F9"
            app:qmui_backgroundColor="#F4F3F9"
            app:qmui_borderWidth="@dimen/dp_1"
             >

            <ImageView
                android:layout_width="35dp"
                android:layout_height="35dp"
                android:padding="7dp"
                android:src="@drawable/ic_login_user_name" />

            <com.ysnows.base.widget.DelEditText
                android:id="@+id/edt_user_name"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@null"
                android:hint="@string/please_input_user_phone"
                android:inputType="phone"
                android:text="@={vm.phone}"
                android:textSize="@dimen/sp_15" />

        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout >


        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginLeft="35dp"
            android:layout_marginTop="25dp"
            android:layout_marginRight="35dp"
            android:gravity="center_vertical"
            android:paddingStart="@dimen/dp_8"
            android:paddingEnd="@dimen/dp_14"
            app:rv_radius="25dp"
            app:qmui_borderWidth="@dimen/dp_1"
            app:qmui_borderColor="#F4F3F9"
            app:qmui_backgroundColor="#F4F3F9"
            android:visibility="@{vm.codeVisibility}"

            >

            <ImageView
                android:layout_width="35dp"
                android:layout_height="35dp"
                android:padding="5dp"
                android:src="@drawable/ic_login_pwd" />

            <com.ysnows.base.widget.DelEditText
                android:id="@+id/edt_code"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="match_parent"
                android:background="@null"
                android:hint="@string/please_input_code"
                android:text="@={vm.code}"
                android:textSize="@dimen/sp_15" />

            <View
                android:layout_width="1dp"
                android:background="#4B3200"
                android:layout_height="27dp"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="24dp"
                android:gravity="center_vertical"
                android:onClick="@{v->vm.getSmsCode(1)}"
                android:text="@{vm.codeTip,default=@string/get_sms_code}"
                android:textColor="#4B3200"
                android:textSize="10sp" />


        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout >



        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginLeft="35dp"
            android:layout_marginTop="25dp"
            android:layout_marginRight="35dp"
            android:gravity="center_vertical"
            android:paddingStart="@dimen/dp_8"
            android:paddingEnd="@dimen/dp_14"
            app:rv_radius="25dp"
            app:qmui_borderWidth="@dimen/dp_1"
            app:qmui_borderColor="#F4F3F9"
            app:qmui_backgroundColor="#F4F3F9"
            android:visibility="@{vm.passwordVisiblity}"

            >

            <ImageView
                android:layout_width="35dp"
                android:layout_height="35dp"
                android:padding="5dp"
                android:src="@drawable/ic_login_pwd" />

            <com.ysnows.base.widget.DelEditText
                android:id="@+id/edt_pwd"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@null"
                android:hint="@string/please_input_pwd"
                android:inputType="textPassword"
                android:text="@={vm.passWord}"
                android:textSize="@dimen/sp_15" />

        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout >



        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@={vm.switchType}"
            android:layout_marginRight="35dp"
            android:layout_gravity="right"
            android:layout_marginTop="15dp"
            android:paddingTop="20dp"
            android:onClick="@{v->vm.setShowType()}"
            android:textColor="#4B3200"
            android:textSize="12sp">

        </TextView>

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:layout_marginLeft="35dp"
            android:layout_marginTop="10dp"
            android:layout_marginRight="35dp"
            android:background="@color/colorPrimary"
            app:cardBackgroundColor="@color/colorPrimary"
            app:cardCornerRadius="22.5dp"
            app:cardElevation="2dp"
            app:cardPreventCornerOverlap="true" >

            <Button
                android:id="@+id/btn_login"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#E17E30"
                android:onClick="@{v->vm.login()}"
                android:text="@string/login"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_16" />

        </androidx.cardview.widget.CardView >


        <LinearLayout
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:gravity="center"
            android:layout_height="wrap_content">

            <LinearLayout
                android:id="@+id/ll_register"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingTop="10dp"
                android:layout_gravity="center"
                android:onClick="@{v->MUiSwitch.INSTANCE.toRegister(vm.view().context())}"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="没有账号？去"
                    android:textColor="#4B3200"
                    android:textSize="12sp">

                </TextView>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="注册"
                    android:textColor="#EA5169"
                    android:textSize="12sp">

                </TextView>


            </LinearLayout>


            <LinearLayout
                android:id="@+id/ll_one_login"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginLeft="20dp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingTop="10dp"
                    android:text="继续一键登录"
                    android:onClick="@{v->MUiSwitch.INSTANCE.toOneLogin(vm.view().context())}"
                    android:textColor="#4B3200"
                    android:textSize="12sp">

                </TextView>




            </LinearLayout>


        </LinearLayout>





    </LinearLayout >
</layout >
