<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.qmuiteam.qmui.widget.QMUITopBar
        android:id="@+id/add_printer_topbar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/head_height"
        app:qmui_topbar_text_btn_color_state_list="@color/theme_white_color"
        app:qmui_topbar_title_color="@color/theme_white_color" />

    <LinearLayout
        style="@style/print_add_printer_input_style"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:text="名稱"
            android:textColor="@color/normal_color"
            android:textSize="@dimen/dp_14"
            android:textStyle="bold" />

        <EditText
            android:id="@+id/add_printer_ed_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_weight="0.7"
            android:background="@null"
            android:hint="請輸入打印機名稱"
            android:maxLines="1"
            android:textColor="@color/normal_color"
            android:textColorHint="@color/hint_color"
            android:textSize="@dimen/dp_14">

            <requestFocus />
        </EditText>
    </LinearLayout>

    <include layout="@layout/include_horizontal_color_ccc_dividing_line" />

    <LinearLayout
        style="@style/print_add_printer_input_style"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:text="打印機IP"
            android:textColor="@color/normal_color"
            android:textSize="@dimen/dp_14"
            android:textStyle="bold" />

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.7"
            android:orientation="horizontal">

            <EditText
                android:id="@+id/ip_edit_1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="bottom|center_horizontal"
                android:hint="0"
                android:inputType="number"
                android:maxLength="3"
                android:minWidth="@dimen/dp_30"
                android:singleLine="true"
                android:text="192"
                android:textColor="@color/normal_color"
                android:textCursorDrawable="@null"
                android:textSize="@dimen/dp_15" />

            <TextView
                android:id="@+id/dot_1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:text="."
                android:textColor="#000"
                android:textSize="@dimen/dp_20"
                android:textStyle="bold" />

            <EditText
                android:id="@+id/ip_edit_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="bottom|center_horizontal"
                android:hint="0"
                android:inputType="number"
                android:maxLength="3"
                android:minWidth="@dimen/dp_30"
                android:singleLine="true"
                android:text="168"
                android:textColor="@color/normal_color"
                android:textCursorDrawable="@null"
                android:textSize="@dimen/dp_15" />

            <TextView
                android:id="@+id/dot_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:text="."
                android:textColor="#000"
                android:textSize="@dimen/dp_20"
                android:textStyle="bold" />

            <EditText
                android:id="@+id/ip_edit_3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="bottom|center_horizontal"
                android:hint="0"
                android:inputType="number"
                android:maxLength="3"
                android:minWidth="@dimen/dp_30"
                android:singleLine="true"
                android:text="125"
                android:textColor="@color/normal_color"
                android:textCursorDrawable="@null"
                android:textSize="@dimen/dp_15" />

            <TextView
                android:id="@+id/dot_3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:text="."
                android:textColor="#000"
                android:textSize="@dimen/dp_20"
                android:textStyle="bold" />

            <EditText
                android:id="@+id/ip_edit_4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="bottom|center_horizontal"
                android:hint="0"
                android:inputType="number"
                android:maxLength="3"
                android:minWidth="@dimen/dp_30"
                android:singleLine="true"
                android:text="075"
                android:textColor="@color/normal_color"
                android:textCursorDrawable="@null"
                android:textSize="@dimen/dp_15" />
        </LinearLayout>
    </LinearLayout>

    <include layout="@layout/include_horizontal_color_ccc_dividing_line" />

    <LinearLayout
        style="@style/print_add_printer_input_style"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:text="端口號"
            android:textColor="@color/normal_color"
            android:textSize="@dimen/dp_14"
            android:textStyle="bold" />

        <EditText
            android:id="@+id/add_printer_ed_port"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_weight="0.7"
            android:background="@null"
            android:hint="請輸入端口號"
            android:inputType="number"
            android:maxLength="4"
            android:textColor="@color/normal_color"
            android:textColorHint="@color/hint_color"
            android:textSize="@dimen/dp_14" />
    </LinearLayout>

    <include layout="@layout/include_horizontal_color_ccc_dividing_line" />

    <LinearLayout
        style="@style/print_add_printer_input_style"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.3"
            android:text="紙張規格"
            android:textColor="@color/normal_color"
            android:textSize="@dimen/dp_14"
            android:textStyle="bold" />

        <RadioGroup
            android:id="@+id/printer_type"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.7"
            android:checkedButton="@id/print_paper_size_58"
            android:orientation="horizontal">

            <RadioButton
                android:id="@+id/print_paper_size_58"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="58mm"
                android:textColor="@color/normal_color"
                android:textSize="@dimen/dp_14" />

            <RadioButton
                android:id="@+id/print_paper_size_88"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_10"
                android:text="88mm"
                android:textColor="@color/normal_color"
                android:textSize="@dimen/dp_14" />
        </RadioGroup>
    </LinearLayout>

    <include layout="@layout/include_horizontal_color_ccc_dividing_line" />

    <TextView
        android:id="@+id/print_test"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/printer_add_input_paddingLeft"
        android:layout_marginTop="@dimen/dp_30"
        android:layout_marginRight="@dimen/printer_add_input_paddingLeft"
        android:background="@drawable/shape_app_btn"
        android:gravity="center"
        android:paddingTop="@dimen/dp_10"
        android:paddingBottom="@dimen/dp_10"
        android:text="打印測試"
        android:textColor="@color/white"
        android:textSize="@dimen/dp_16" />

</LinearLayout>