<?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">

    <data>

        <variable
            name="presenter"
            type="com.dayu.usercenter.presenter.forgetpwd.ForgetPwdPresenter" />
    </data>

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

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:navigationIcon="@drawable/back_btn_normal">

            <TextView
                android:id="@+id/tv_title"
                style="@style/toolbar_title" />
        </android.support.v7.widget.Toolbar>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_marginTop="8dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:paddingLeft="15dp"
            android:paddingRight="15dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="64dp"
                android:text="@string/sms_86"
                android:textColor="@color/default_text_color"
                android:textSize="15sp" />

            <EditText
                android:id="@+id/mobile"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:background="@null"
                android:hint="@string/tv_login_phone_editext_hint"
                android:inputType="phone"
                android:maxLength="11"
                android:text="@={presenter.phoneNume}"
                android:textColor="@color/default_text_color"
                android:textSize="15sp" />
        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="3dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:paddingLeft="15dp"
            android:paddingRight="15dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="40dp"
                android:text="@string/sms_code"
                android:textColor="@color/default_text_color"
                android:textSize="15sp" />

            <EditText
                android:id="@+id/code"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:background="@null"
                android:hint="@string/input_sms_code"
                android:inputType="number"
                android:text="@={presenter.code}"
                android:textColor="@color/default_text_color"
                android:textSize="15sp" />

            <View
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:background="@color/cl_line" />

            <TextView
                android:id="@+id/get_code"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:alpha="0.35"
                android:onClick="@{()->presenter.sendCode()}"
                android:text="@string/tv_login_register_button_text"
                android:textColor="@color/bg_button" />
        </LinearLayout>

        <TextView
            android:id="@+id/next"
            android:layout_width="match_parent"
            android:layout_height="47dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="25dp"
            android:alpha="0.35"
            android:background="@drawable/tab_blue_react"
            android:gravity="center"
            android:onClick="@{()->presenter.next()}"
            android:text="@string/next_step"
            android:textColor="@color/white"
            android:textSize="16sp" />
    </LinearLayout>
</layout>