<?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="familyData"
            type="com.rdiot.yx485.bean.FamilyData" />
        <variable
            name="vm"
            type="com.rdiot.yx485.ui.bind.model.BindViewModel" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".ui.bind.EnterRoomInfoFragment">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="vertical"
            android:paddingStart="30dp"
            android:paddingEnd="30dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="21dp"
                android:text="@{familyData.name}"
                android:textColor="@color/main_text_color"
                android:textSize="16sp"
                android:textStyle="bold"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="我的家" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="8dp"
                android:background="@color/dividing_line_color"
                app:layout_constraintTop_toBottomOf="@id/et_phone" />

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/et_room_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="42dp"
                android:background="@null"
                android:hint="@string/enter_room_name"
                android:text="@={vm.roomName}"
                android:singleLine="true"
                android:textColor="@color/main_text_color"
                android:textColorHint="@color/main_sub_text_color"
                android:textSize="16sp"
                android:textStyle="bold"
                app:layout_constraintTop_toTopOf="parent" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="8dp"
                android:background="@color/dividing_line_color"
                app:layout_constraintTop_toBottomOf="@id/et_phone" />

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

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_panel_no"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="@null"
                    android:hint="@string/enter_panel_number"
                    android:inputType="text"
                    android:singleLine="true"
                    android:text="@={vm.panelNum}"
                    android:maxLines="1"
                    android:textColor="@color/main_text_color"
                    android:textColorHint="@color/main_sub_text_color"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    app:layout_constraintTop_toTopOf="parent" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/iv_scan"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    app:srcCompat="@mipmap/icon_scan" />

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/dividing_line_color"
                app:layout_constraintTop_toBottomOf="@id/et_phone" />
        </LinearLayout>

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/btn_next"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="30dp"
            android:layout_marginEnd="30dp"
            android:layout_marginBottom="55dp"
            android:background="@drawable/bg_login_btn"
            android:outlineProvider="none"
            android:text="@string/next_step"
            android:textColor="@color/white"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent" />

    </LinearLayout>
</layout>