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

        <variable
            name="user"
            type="com.example.jinyu_rfid.been.LoginVm" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:orientation="vertical"
        tools:context=".MainActivity">


        <TextView
            android:layout_width="match_parent"
            android:layout_height="45dp"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="35dp"
            android:gravity="left|center"
            android:text="Login：RFID APP"
            android:textColor="@color/black"

            android:textSize="22sp" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/textInputLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="12dp"
            android:layout_marginRight="20dp"
            android:hint="@string/user_name">

            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:lines="1"
                android:maxLines="1"
                android:text="@={user.username}" />

        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/textInputLayout2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="12dp"
            android:layout_marginRight="20dp"
            android:hint="@string/pass_word"
            app:passwordToggleEnabled="true">

            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:imeOptions="actionDone"
                android:inputType="textPassword"
                android:text="@={user.password}" />

        </com.google.android.material.textfield.TextInputLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="12dp"
            android:layout_marginRight="20dp">

            <TextView
                android:layout_width="120dp"
                android:layout_height="match_parent"
                android:gravity="left|center"
                android:paddingLeft="14dp"
                android:text="@string/language_select"
                android:textSize="18sp" />

            <Spinner
                android:id="@+id/main_language"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:entries="@array/language" />

        </LinearLayout>

        <CheckBox
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="10dp"
            android:layout_marginRight="20dp"
            android:checked="@={user.remember}"
            android:text="@string/remember_me" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="10dp"
            android:layout_marginRight="20dp"
            android:letterSpacing="0.2"
            android:onClick="login_click"
            android:text="@string/login_button_name"
            android:textSize="20sp"
            android:textStyle="bold" />

    </LinearLayout>
</layout>