<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    android:orientation="vertical"
    tools:context=".ui.activity.device.set.LedLightActivity">

    <include
        android:id="@+id/il_led_light_bar"
        layout="@layout/layout_top_bar" />

    <com.abbidot.tracker.widget.TypefaceButton
        android:id="@+id/btn_led_light_set_save"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@id/il_led_light_bar"
        android:layout_alignParentEnd="true"
        android:layout_marginEnd="@dimen/dp_24"
        android:layout_marginBottom="@dimen/dp_10"
        android:background="@color/select_color2"
        android:paddingHorizontal="@dimen/dp_14"
        android:paddingVertical="@dimen/dp_6"
        android:text="@string/acccount_btn_save"
        android:textColor="@color/btn_color"
        android:textSize="@dimen/textSize12"
        app:qmui_radius="@dimen/dp_100"
        app:typeface="@string/roboto_bold_font" />

    <androidx.core.widget.NestedScrollView
        style="@style/my_ScrollView_style"
        android:layout_below="@id/il_led_light_bar"
        android:layout_alignParentBottom="true">

        <androidx.appcompat.widget.LinearLayoutCompat
            style="@style/root_layout_style"
            android:layout_marginHorizontal="@dimen/dp_20"
            android:layout_marginVertical="@dimen/dp_16"
            android:orientation="vertical">

            <androidx.appcompat.widget.AppCompatImageView
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_120"
                android:src="@drawable/icon_tracker_device_small" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_18"
                android:orientation="horizontal">

                <include
                    android:id="@+id/led_light_bluetooth_tips"
                    layout="@layout/layout_ble_connect_state"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true" />


                <com.abbidot.tracker.widget.TypefaceRoundButton
                    android:id="@+id/btn_led_light_issue"
                    android:layout_width="@dimen/dp_22"
                    android:layout_height="@dimen/dp_22"
                    android:layout_alignParentEnd="true"
                    android:layout_centerVertical="true"
                    android:gravity="center"
                    android:text="\?"
                    android:textColor="@color/block_color2"
                    android:textSize="@dimen/textSize12"
                    app:qmui_backgroundColor="@color/transparent"
                    app:qmui_borderColor="@color/block_color2"
                    app:qmui_borderWidth="@dimen/dp_1" />
            </RelativeLayout>


            <com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
                android:id="@+id/led_light_open_and_close"
                style="@style/my_QMUICommonListItemView_style"
                android:layout_marginTop="@dimen/dp_22"
                app:qmui_accessory_type="switcher" />

            <com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
                android:id="@+id/led_light_mode"
                style="@style/my_QMUICommonListItemView_style"
                android:layout_marginTop="@dimen/dp_10"
                app:qmui_accessory_type="chevron" />


            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_10"
                android:layout_marginBottom="@dimen/dp_50"
                android:background="@drawable/shape8_white_bg"
                android:padding="@dimen/dp_16"
                android:visibility="gone">

                <com.abbidot.tracker.widget.TypefaceTextView
                    android:id="@+id/tv_led_light_current_rgb"
                    style="@style/my_TextView_style_v2"
                    android:layout_alignParentEnd="true"
                    android:text="@string/app_name"
                    android:textSize="@dimen/textSize14"
                    app:typeface="@string/roboto_bold_font" />

                <com.abbidot.tracker.widget.TypefaceTextView
                    style="@style/my_TextView_style_v2"
                    android:layout_alignTop="@id/tv_led_light_current_rgb"
                    android:text="@string/txt_current_led"
                    android:textSize="@dimen/textSize14"
                    android:textStyle="bold" />

                <include
                    android:id="@+id/current_select_color"
                    layout="@layout/layout_head_image_view"
                    android:layout_width="@dimen/dp_22"
                    android:layout_height="@dimen/dp_22"
                    android:layout_alignTop="@id/tv_led_light_current_rgb"
                    android:layout_marginEnd="@dimen/dp_4"
                    android:layout_toStartOf="@id/tv_led_light_current_rgb" />

                <com.abbidot.tracker.widget.ColorPickerRectangle
                    android:id="@+id/select_color_paint_view"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/current_select_color"
                    android:layout_marginTop="@dimen/dp_40" />

                <androidx.appcompat.widget.LinearLayoutCompat
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/current_select_color"
                    android:layout_alignTop="@id/select_color_paint_view"
                    android:layout_alignBottom="@id/select_color_paint_view"
                    android:layout_alignParentEnd="true"
                    android:layout_toEndOf="@id/select_color_paint_view"
                    android:gravity="center"
                    android:orientation="vertical">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/color_select_recycler_view"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:nestedScrollingEnabled="false" />

                </androidx.appcompat.widget.LinearLayoutCompat>
            </RelativeLayout>
        </androidx.appcompat.widget.LinearLayoutCompat>
    </androidx.core.widget.NestedScrollView>

    <include
        android:id="@+id/il_led_light_issue_layout"
        layout="@layout/layout_live_issue"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:visibility="gone" />
</RelativeLayout>