<?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="vm"
            type="com.example.iot_controlhost.ui.fragment.ManualFragmentPresenter" />
    </data>

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="horizontal">

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="20dp"
                android:layout_marginTop="20dp"
                android:layout_marginEnd="10dp"
                android:layout_marginBottom="10dp"
                android:layout_weight="1"
                android:background="#FF9C00"
                app:cardCornerRadius="10dp">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/card_floor"
                    android:layout_width="match_parent"
                    android:background="#FF9C00"
                    android:layout_height="match_parent">

                    <ImageView
                        android:id="@+id/iv_controller_floor"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:layout_margin="15dp"
                        android:layout_weight="1"
                        android:padding="30dp"
                        android:src="@mipmap/floor"
                        android:scaleType="center"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/tv_floor"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:layout_constraintHorizontal_bias="0"
                        android:layout_marginStart="10dp"
                        android:textSize="30sp"
                        android:text="加湿器"
                        android:textStyle="bold"
                        android:textColor="#ffffffff"
                        app:layout_constraintBottom_toBottomOf="@+id/iv_controller_floor"
                        app:layout_constraintEnd_toStartOf="@+id/iv_power_floor"
                        app:layout_constraintStart_toEndOf="@+id/iv_controller_floor"
                        app:layout_constraintTop_toTopOf="@+id/iv_controller_floor" />

                    <ImageView
                        android:id="@+id/iv_power_floor"
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:src="@mipmap/power"
                        android:scaleType="center"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/tv_state_floor"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="15dp"
                        android:text="未启动"
                        android:textColor="#ffffffff"
                        android:textSize="28sp"
                        app:layout_constraintStart_toStartOf="@+id/iv_controller_floor"
                        app:layout_constraintTop_toBottomOf="@+id/iv_controller_floor" />

                    <TextView
                        android:id="@+id/tv_power_floor"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="15dp"
                        android:text="当前功率：--"
                        android:textColor="#B3FFFFFF"
                        android:textSize="20sp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/tv_state_floor" />

                    <TextView
                        android:id="@+id/tv_floor_t"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@{vm.floorT}"
                        android:layout_marginEnd="20dp"
                        android:textColor="#B3FFFFFF"
                        android:textSize="20sp"
                        app:layout_constraintBottom_toBottomOf="@+id/tv_power_floor"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="@+id/tv_power_floor" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="10dp"
                android:layout_marginTop="20dp"
                android:layout_marginEnd="20dp"
                android:layout_marginBottom="10dp"
                android:layout_weight="1"
                android:background="#FF9C00"
                app:cardCornerRadius="10dp">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/card_air"
                    android:layout_width="match_parent"
                    android:background="#FF9C00"
                    android:layout_height="match_parent">

                    <ImageView
                        android:id="@+id/iv_controller_air"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:layout_margin="15dp"
                        android:layout_weight="1"
                        android:padding="30dp"
                        android:src="@mipmap/floor"
                        android:scaleType="center"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/tv_air"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        app:layout_constraintHorizontal_bias="0"
                        android:layout_marginStart="10dp"
                        android:textSize="30sp"
                        android:text="空调"
                        android:textStyle="bold"
                        android:textColor="#ffffffff"
                        app:layout_constraintBottom_toBottomOf="@+id/iv_controller_air"
                        app:layout_constraintEnd_toStartOf="@+id/iv_power_air"
                        app:layout_constraintStart_toEndOf="@+id/iv_controller_air"
                        app:layout_constraintTop_toTopOf="@+id/iv_controller_air" />

                    <ImageView
                        android:id="@+id/iv_power_air"
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:src="@mipmap/power"
                        android:scaleType="center"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/tv_state_air"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="15dp"
                        android:text="未启动"
                        android:textColor="#ffffffff"
                        android:textSize="28sp"
                        app:layout_constraintStart_toStartOf="@+id/iv_controller_air"
                        app:layout_constraintTop_toBottomOf="@+id/iv_controller_air" />

                    <TextView
                        android:id="@+id/tv_power_air"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="15dp"
                        android:text="当前功率：--"
                        android:textColor="#B3FFFFFF"
                        android:textSize="20sp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/tv_state_air" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.cardview.widget.CardView>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="2"
            android:orientation="vertical">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycle_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_margin="10dp"
                tools:itemCount="6"
                tools:listitem="@layout/item_controller" />

        </LinearLayout>
    </LinearLayout>
</layout>