<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginBottom="12dp">

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnBluetoothConn"
                    android:text="@string/str_bluetooth_connect" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnUsbConn"
                    android:text="@string/str_usb_connect" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnWifiConn"
                    android:text="@string/str_wifi_connect" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnSerialPortConn"
                    android:text="@string/str_serialport_connect" />

            </LinearLayout>

            <TextView
                android:id="@+id/tv_connState"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="12dp"
                android:layout_marginTop="8dp"
                android:text="@string/str_conn_state_disconnect"
                android:textSize="14sp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginTop="8dp">

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnReceiptPrint"
                    android:text="@string/str_receipt_print" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnLabelPrint"
                    android:text="@string/str_label_print" />
                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnlabelPhoto"
                    android:text="@string/str_label_print_long_photo" />
                <TextView
                    android:text="@string/str_photo_description"
                    android:layout_width="match_parent"
                    android:gravity="center"
                    android:layout_height="wrap_content" />
                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnLabelMatrix"
                    android:text="@string/matrix" />
                <TextView
                    android:text="@string/matrix_tip"
                    android:layout_width="match_parent"
                    android:gravity="center"
                    android:layout_height="wrap_content" />
                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnCpclPrint"
                    android:text="@string/str_cpcl_print" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnDisConn"
                    android:text="@string/str_disconnect" />

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnPrinterState"
                    android:text="@string/str_state_query" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <Button
                        android:layout_width="0dp"
                        android:layout_weight="3"
                        android:layout_height="wrap_content"
                        android:onClick="btnModeChange"
                        android:text="@string/str_mode_change"
                        />

                    <Spinner android:layout_width="0dp"
                        android:layout_weight="2"
                        android:layout_height="match_parent"
                        android:id="@+id/mode_sp"
                        android:spinnerMode="dialog"
                        />
                </LinearLayout>



                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnPrintSelftest"
                    android:text="@string/str_print_selftest" />
                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:onClick="btnPrintXml"
                    android:text="@string/str_print_xml" />
                <!--<Button-->
                    <!--android:layout_width="match_parent"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:onClick="btnceshi"-->
                    <!--android:text="测试"/>-->

            </LinearLayout>
            <!--<TextView-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="150dp"-->
                <!--android:id="@+id/tv_read"/>-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
                <TextView
                    android:layout_width="100dp"
                    android:layout_height="match_parent"
                    android:text="@string/str_tv_printcount"
                    android:textSize="15dp"
                    android:gravity="center"/>
            <EditText
                android:id="@+id/et_print_counts"
                android:hint=""
                android:inputType="number"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
            </LinearLayout>

            <LinearLayout
                android:layout_marginTop="5dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <Button
                    android:onClick="btnReceiptAndLabelContinuityPrint"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/str_conn_receipt_and_label_continuity_print"/>
            </LinearLayout>
            <LinearLayout
                android:layout_marginTop="12dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <Button
                    android:onClick="btnStopContinuityPrint"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/str_stop_continuityprint"/>
            </LinearLayout>
            <LinearLayout
                android:layout_marginTop="12dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <Button
                    android:onClick="btnMoreDevices"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/str_conn_devices"/>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</LinearLayout>
