<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:minWidth="@dimen/width_250"
    >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="@dimen/padding_layout_2"
        android:background="@drawable/ll_round"
        android:layout_gravity="center"
        >
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="@dimen/margin_layout_2"
            android:layout_marginStart="@dimen/margin_layout_2"
            android:layout_marginEnd="@dimen/margin_layout_2"
            android:layout_marginBottom="@dimen/margin_15"

            >
            <TextView
                android:layout_gravity="center"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="串口参数配置"
                android:textColor="@color/colorBlack"
                android:textSize="@dimen/text_size"
                />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:background="@drawable/ll_border"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="@dimen/margin_layout_20"
                android:layout_marginTop="@dimen/margin_layout_2"
                >
                <TextView
                    android:text="波特率"
                    android:textColor="@color/colorBlack"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    />
                <Spinner
                    android:id="@+id/spinner_baud"
                    android:layout_marginStart="@dimen/margin_layout_1"
                    android:layout_width="@dimen/width_btn_data_70"
                    android:layout_height="@dimen/height_btn_data_30"
                    android:background="@drawable/bg_spinner"
                    android:gravity="center_horizontal|center"
                    android:spinnerMode="dropdown"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="@dimen/margin_layout_20"
                android:layout_marginTop="@dimen/margin_layout_1"
                >
                <TextView
                    android:text="数据位"
                    android:textColor="@color/colorBlack"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    />
                <Spinner
                    android:id="@+id/spinner_data"
                    android:layout_marginStart="@dimen/margin_layout_1"
                    android:layout_width="@dimen/width_btn_data_70"
                    android:layout_height="@dimen/height_btn_data_30"
                    android:background="@drawable/bg_spinner"
                    android:gravity="center_horizontal|center"
                    android:spinnerMode="dropdown"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="@dimen/margin_layout_20"
                android:layout_marginTop="@dimen/margin_layout_1"
                >
                <TextView
                    android:text="停止位"
                    android:textColor="@color/colorBlack"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"/>
                <Spinner
                    android:id="@+id/spinner_stop"
                    android:layout_marginStart="@dimen/margin_layout_1"
                    android:layout_width="@dimen/width_btn_data_70"
                    android:layout_height="@dimen/height_btn_data_30"
                    android:background="@drawable/bg_spinner"
                    android:gravity="center_horizontal|center"
                    android:spinnerMode="dropdown"
                    />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="@dimen/margin_layout_20"
                android:layout_marginTop="@dimen/margin_layout_1"
                android:layout_marginBottom="@dimen/margin_layout_2"
                >
                <TextView
                    android:text="校验位"
                    android:textColor="@color/colorBlack"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"/>
                <Spinner
                    android:id="@+id/spinner_parity"
                    android:layout_marginStart="@dimen/margin_layout_1"
                    android:layout_width="@dimen/width_btn_data_70"
                    android:layout_height="@dimen/height_btn_data_30"
                    android:background="@drawable/bg_spinner"
                    android:gravity="center_horizontal|center"
                    android:spinnerMode="dropdown"
                    />
                <LinearLayout
                    android:layout_weight="1"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"/>
                <Button
                    android:id="@+id/set"
                    android:layout_width="@dimen/width_btn_data_70"
                    android:layout_height="@dimen/height_btn_data_30"
                    android:layout_gravity="center"
                    android:layout_marginEnd="@dimen/margin_layout_1"
                    android:text="设置"
                    android:textColor="@color/colorWhite"
                    android:background="@drawable/btn_round"
                    style="?android:attr/borderlessButtonStyle"
                    android:textSize="@dimen/text_size_small"
                    />
            </LinearLayout>
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:background="@drawable/ll_border"
            android:layout_marginTop="@dimen/margin_layout_1"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="@dimen/margin_layout_20"
                android:layout_marginTop="@dimen/margin_layout_1"
                >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="硬件串口自动流控(CTS/RTS)"
                    android:textColor="@color/colorBlack" />
                <com.suke.widget.SwitchButton
                    android:id="@+id/sb_flow"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/margin_layout_20"
                    xmlns:app="http://schemas.android.com/apk/res-auto"
                    app:sb_checked="true"
                    app:sb_checked_color="@color/colorPrimary"
                    />
            </LinearLayout>
            <LinearLayout
                android:id="@+id/ll_flow_detail"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginStart="@dimen/margin_15"
                android:layout_marginTop="@dimen/margin_layout_1"
                >
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    >
                    <CheckBox
                        android:id="@+id/cb_dtr"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="DTR"
                        />
                    <CheckBox
                        android:id="@+id/cb_rts"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="RTS"
                        />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginTop="@dimen/margin_15"


            >
            <Button
                android:id="@+id/cancel"
                android:layout_width="match_parent"
                android:layout_height="@dimen/height_btn_data_30"
                android:layout_gravity="center"
                android:text="关闭"
                android:textColor="@color/colorWhite"
                android:background="@drawable/btn_round"
                style="?android:attr/borderlessButtonStyle"
                android:textSize="@dimen/text_size_small"
                />

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