<?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="userData"
            type="com.rdiot.yx485.bean.UserData" />
    </data>

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

        <View
            android:id="@+id/v"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintTop_toTopOf="parent" />

        <com.rdiot.yx485.view.ZNavbar
            android:id="@+id/nb"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            app:zTitle="@string/personal_information" />

        <!--头像-->
        <LinearLayout
            android:id="@+id/ll_avatar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="23dp"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:text="@string/avatar"
                android:textColor="@color/main_text_color"
                android:textSize="15sp" />

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_avatar"
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:adjustViewBounds="true"
                app:layout_constraintBottom_toBottomOf="@id/tv_1"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tv_user_name" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="20dp"
                android:alpha="0.5"
                android:rotation="180"
                app:srcCompat="@mipmap/icon_back" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:background="@color/dividing_line_color" />

        <!--用户名-->
        <LinearLayout
            android:id="@+id/ll_user_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="23dp"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:text="@string/user_name"
                android:textColor="@color/main_text_color"
                android:textSize="15sp" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                android:layout_weight="1"
                android:maxLines="1"
                android:ellipsize="end"
                android:gravity="end"
                android:text="@{userData.userName}"
                android:textColor="@color/main_sub_text_color"
                android:textSize="15sp"
                tools:text="mR2hao" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="20dp"
                android:alpha="0.5"
                android:rotation="180"
                app:srcCompat="@mipmap/icon_back" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:background="@color/dividing_line_color" />

        <!--手机号-->
        <LinearLayout
            android:id="@+id/ll_phone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="23dp"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:text="@string/phone_number"
                android:textColor="@color/main_text_color"
                android:textSize="15sp" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:ellipsize="end"
                android:gravity="end"
                android:text="@{userData.phone}"
                android:textColor="@color/main_sub_text_color"
                android:textSize="15sp"
                tools:text="18688888888" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="20dp"
                android:alpha="0.5"
                android:rotation="180"
                app:srcCompat="@mipmap/icon_back" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="15dp"
            android:background="@color/main_bg_color" />

        <!--修改密码-->
        <LinearLayout
            android:id="@+id/ll_change_pwd"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="23dp"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:text="@string/set_password"
                android:textColor="@color/main_text_color"
                android:textSize="15sp" />


            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="20dp"
                android:alpha="0.5"
                android:rotation="180"
                app:srcCompat="@mipmap/icon_back" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="20dp"
            android:background="@color/dividing_line_color" />

        <!--注销账户-->
        <LinearLayout
            android:id="@+id/ll_log_out_account"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="23dp"
                android:layout_marginTop="20dp"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:text="@string/log_out_account"
                android:textColor="@color/warning"
                android:textSize="15sp" />


            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="20dp"
                android:alpha="0.5"
                android:rotation="180"
                app:srcCompat="@mipmap/icon_back" />

        </LinearLayout>

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/main_bg_color"
            android:paddingBottom="55dp">

            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/btn_sign_out"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:layout_marginEnd="30dp"
                android:background="@drawable/bg_login_btn"
                android:outlineProvider="none"
                android:text="@string/sign_out"
                android:textColor="@color/white"
                android:textSize="16sp"
                android:textStyle="bold" />
        </LinearLayout>

    </LinearLayout>
</layout>