<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ChannelActivity">

    <Spinner
        android:id="@+id/channels"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@style/Widget.AppCompat.Spinner.Underlined"
        android:entries="@array/channels"
        android:layout_marginStart="12dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <EditText
        android:id="@+id/cameraId"
        android:layout_width="64dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="@string/channel_cfg_camera_id"
        android:inputType="numberDecimal"
        android:layout_marginStart="6dp"
        android:layout_marginTop="6dp"
        app:layout_constraintStart_toEndOf="@+id/channels"
        app:layout_constraintTop_toTopOf="@+id/channels"
        app:layout_constraintBottom_toBottomOf="@+id/channels" />

    <Switch
        android:id="@+id/btnUsbCamera"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="6dp"
        android:text="@string/channel_cfg_usb_camera"
        app:layout_constraintStart_toEndOf="@+id/cameraId"
        app:layout_constraintTop_toTopOf="@+id/cameraId" />

    <Button
        android:id="@+id/btnSave"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="6dp"
        android:text="@string/btn_save"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <EditText
        android:id="@+id/resolutionCX"
        android:layout_width="120dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="@string/channel_cfg_width"
        android:inputType="numberDecimal"
        android:layout_marginStart="6dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/btnSave" />

    <EditText
        android:id="@+id/resolutionCY"
        android:layout_width="120dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="@string/channel_cfg_height"
        android:inputType="numberDecimal"
        android:layout_marginStart="6dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toEndOf="@+id/resolutionCX"
        app:layout_constraintTop_toBottomOf="@+id/btnSave" />

    <EditText
        android:id="@+id/quality"
        android:layout_width="120dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="@string/channel_cfg_quality"
        android:inputType="numberDecimal"
        android:layout_marginStart="12dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toEndOf="@+id/resolutionCY"
        app:layout_constraintTop_toBottomOf="@+id/btnSave" />

    <Switch
        android:id="@+id/btnAutoExplosure"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="6dp"
        android:text="@string/channel_cfg_auto_exposure"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />

    <Switch
        android:id="@+id/btnAutoFocus"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="6dp"
        android:text="@string/channel_cfg_auto_focus"
        app:layout_constraintStart_toEndOf="@+id/btnAutoExplosure"
        app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />

    <Switch
        android:id="@+id/btnHdrMode"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="6dp"
        android:text="HDR"
        app:layout_constraintStart_toEndOf="@+id/btnAutoFocus"
        app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />

    <Switch
        android:id="@+id/btnNightMode"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="6dp"
        android:text="Night"
        app:layout_constraintStart_toEndOf="@+id/btnHdrMode"
        app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />

    <TextView
        android:id="@+id/textViewExplosure"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="曝光时间(ms)"
        android:layout_marginStart="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/exposuretime"
        app:layout_constraintBottom_toBottomOf="@+id/exposuretime" />

    <EditText
        android:id="@+id/exposuretime"
        android:layout_width="120dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="numberDecimal"
        android:layout_marginStart="6dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toEndOf="@+id/textViewExplosure"
        app:layout_constraintTop_toBottomOf="@+id/btnAutoExplosure" />

    <TextView
        android:id="@+id/textViewSensitivity"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="ISO"
        android:layout_marginStart="12dp"
        app:layout_constraintStart_toEndOf="@+id/exposuretime"
        app:layout_constraintTop_toTopOf="@+id/exposuretime"
        app:layout_constraintBottom_toBottomOf="@+id/exposuretime" />

    <EditText
        android:id="@+id/sensitivity"
        android:layout_width="96dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="numberDecimal"
        android:layout_marginStart="4dp"
        app:layout_constraintStart_toEndOf="@+id/textViewSensitivity"
        app:layout_constraintTop_toTopOf="@+id/exposuretime"
        app:layout_constraintBottom_toBottomOf="@+id/exposuretime" />

    <TextView
        android:id="@+id/textViewOrientations"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="旋转角度:"
        android:layout_marginStart="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/orientations"
        app:layout_constraintBottom_toBottomOf="@+id/orientations" />

    <Spinner
        android:id="@+id/orientations"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@style/Widget.AppCompat.Spinner.Underlined"
        android:entries="@array/orientations"
        android:layout_marginStart="6dp"
        android:layout_marginTop="12dp"
        app:layout_constraintStart_toEndOf="@+id/textViewOrientations"
        app:layout_constraintTop_toBottomOf="@+id/exposuretime" />

    <Spinner
        android:id="@+id/recognization"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@style/Widget.AppCompat.Spinner.Underlined"
        android:entries="@array/recog_options"
        android:layout_marginStart="6dp"
        app:layout_constraintStart_toEndOf="@+id/orientations"
        app:layout_constraintTop_toTopOf="@+id/orientations" />

    <EditText
        android:id="@+id/osdLeftTop"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="text"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="6dp"
        android:hint="@string/osd_left_top"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/recognization" />

    <EditText
        android:id="@+id/osdRightTop"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="text"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="6dp"
        android:hint="@string/osd_right_top"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/osdLeftTop" />

    <EditText
        android:id="@+id/osdRightBottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="text"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="6dp"
        android:hint="@string/osd_right_bottom"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/osdRightTop" />

    <EditText
        android:id="@+id/osdLeftBottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="text"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="6dp"
        android:hint="@string/osd_left_bottom"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/osdRightBottom" />


</androidx.constraintlayout.widget.ConstraintLayout>