<?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.newpwd.NewPwdPresenter" />
    </data>


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

        <androidx.appcompat.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" />
        </androidx.appcompat.widget.Toolbar>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="66dp"
            android:layout_marginBottom="10dp"
            android:layout_marginTop="2dp"
            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="5dp"
                android:text="@string/for_your_account"
                android:textColor="@color/default_editext_color"
                android:textSize="15sp" />

            <TextView
                android:id="@+id/mobile"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/default_text_color"
                android:textSize="18sp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:text="@string/set_a_new_pwd"
                android:textColor="@color/default_editext_color"
                android:textSize="15sp" />
        </LinearLayout>

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

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

            <ImageView
                android:id="@+id/show_pwd"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/icon_pw_close" />
        </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="20dp"
            android:alpha="0.35"
            android:background="@drawable/tab_blue_react"
            android:gravity="center"
            android:onClick="@{()->presenter.ModifyPwd()}"
            android:text="@string/comfirm"
            android:textColor="@color/white"
            android:textSize="16sp" />
    </LinearLayout>
</layout>