<?xml version="1.0" encoding="utf-8"?>
<com.kdt.DefocusableScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="@dimen/_280sdp"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/background_app"
    android:layout_marginVertical="@dimen/_14sdp"
    >

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/edit_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingHorizontal="@dimen/_5sdp"
        android:paddingVertical="@dimen/_5sdp"
        app:layout_optimizationLevel="standard|dimensions|chains">


        <!-- EDIT NAME SECTION -->
        <TextView
            android:id="@+id/editName_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/global_name"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <EditText
            android:id="@+id/editName_editText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:hint="Button Name"
            android:imeOptions="flagNoExtractUi"
            android:maxLines="1"

            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editName_textView" />

        <!--  SIZE SECTION -->
        <TextView
            android:id="@+id/editSize_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_size"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editName_editText"
            tools:visibility="visible" />

        <EditText
            android:id="@+id/editSize_editTextX"
            android:layout_width="@dimen/_138sdp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:imeOptions="flagNoExtractUi"
            android:inputType="numberDecimal"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editSize_textView" />

        <EditText
            android:id="@+id/editSize_editTextY"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:gravity="center"
            android:imeOptions="flagNoExtractUi"
            android:inputType="numberDecimal"

            app:layout_constraintBottom_toBottomOf="@+id/editSize_editTextX"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/editSize_editTextX"
            app:layout_constraintTop_toTopOf="@+id/editSize_editTextX" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="x"

            app:layout_constraintBottom_toBottomOf="@+id/editSize_editTextX"
            app:layout_constraintEnd_toStartOf="@id/editSize_editTextY"
            app:layout_constraintStart_toEndOf="@id/editSize_editTextX"
            app:layout_constraintTop_toTopOf="@+id/editSize_editTextX" />

        <!-- MAPPING SECTION -->
        <TextView
            android:id="@+id/editMapping_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:paddingEnd="5dp"
            android:text="@string/customctrl_mapping"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editSize_editTextX" />

        <Spinner
            android:id="@+id/editMapping_spinner_1"
            android:layout_width="0dp"
            android:layout_height="30dp"
            android:background="@android:color/transparent"
            android:gravity="center"

            app:layout_constraintBottom_toTopOf="@id/editMapping_spinner_3"
            app:layout_constraintEnd_toStartOf="@id/editMapping_spinner_2"

            app:layout_constraintHorizontal_chainStyle="spread"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editMapping_textView"
            app:layout_constraintVertical_chainStyle="spread" />


        <TextView
            android:id="@+id/editMapping_plus_1"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="+"

            app:layout_constraintBottom_toBottomOf="@+id/editMapping_spinner_1"
            app:layout_constraintEnd_toEndOf="@+id/editMapping_spinner_1"
            app:layout_constraintTop_toTopOf="@+id/editMapping_spinner_1" />


        <Spinner
            android:id="@+id/editMapping_spinner_2"
            android:layout_width="0dp"
            android:layout_height="30dp"
            android:background="@android:color/transparent"
            android:gravity="center"

            app:layout_constraintBottom_toBottomOf="@+id/editMapping_spinner_1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/editMapping_spinner_1"
            app:layout_constraintTop_toTopOf="@+id/editMapping_spinner_1" />

        <TextView
            android:id="@+id/editMapping_plus_2"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="+"

            app:layout_constraintBottom_toBottomOf="@id/editMapping_textView"
            app:layout_constraintEnd_toEndOf="@id/editMapping_textView"
            app:layout_constraintTop_toTopOf="@id/editMapping_spinner_3"

            />

        <Spinner
            android:id="@+id/editMapping_spinner_3"
            android:layout_width="0dp"
            android:layout_height="30dp"
            android:background="@android:color/transparent"
            android:gravity="center"


            app:layout_constraintEnd_toStartOf="@id/editMapping_spinner_4"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editMapping_spinner_1" />

        <TextView
            android:id="@+id/editMapping_plus_3"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="+"


            app:layout_constraintBottom_toBottomOf="@+id/editMapping_spinner_3"
            app:layout_constraintEnd_toEndOf="@+id/editMapping_spinner_3"
            app:layout_constraintTop_toBottomOf="@+id/editMapping_spinner_1" />

        <Spinner
            android:id="@+id/editMapping_spinner_4"
            android:layout_width="0dp"
            android:layout_height="30dp"
            android:background="@android:color/transparent"
            android:gravity="center"


            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/editMapping_spinner_3"
            app:layout_constraintTop_toBottomOf="@id/editMapping_spinner_2" />


        <!-- ORIENTATION SECTION -->
        <TextView
            android:id="@+id/editOrientation_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_orientation"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editMapping_spinner_3" />

        <Spinner
            android:id="@+id/editOrientation_spinner"
            android:layout_width="0dp"
            android:layout_height="30dp"
            android:background="@android:color/transparent"


            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editOrientation_textView" />

        <!-- TOGGLE SECTION -->
        <Switch
            android:id="@+id/checkboxToggle"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:text="@string/customctrl_toggle"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editOrientation_spinner"
            tools:ignore="UseSwitchCompatOrMaterialXml" />

        <!-- MOUSE PASS THROUGH SECTION -->
        <Switch
            android:id="@+id/checkboxPassThrough"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:text="@string/customctrl_passthru"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/checkboxToggle"
            tools:ignore="UseSwitchCompatOrMaterialXml" />

        <!-- SWIPEABLE BUTTON SECTION -->
        <Switch
            android:id="@+id/checkboxSwipeable"
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:text="@string/customctrl_swipeable"

            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/checkboxPassThrough"
            tools:ignore="UseSwitchCompatOrMaterialXml" />

        <!-- BACKGROUND COLOR SECTION -->
        <fr.spse.extended_view.ExtendedTextView
            android:id="@+id/editBackgroundColor_textView"
            android:background="?attr/selectableItemBackground"
            android:layout_width="0dp"
            android:layout_height="35dp"
            android:gravity="center_vertical"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_background_color"
            android:drawableEnd="@drawable/spinner_arrow_right"
            app:drawableEndSize="20dp"
            app:drawableEndIntegerScaling="true"


            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/checkboxSwipeable" />



        <!-- STROKE WIDTH -->
        <TextView
            android:id="@+id/editStrokeWidth_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_stroke_width"


            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editStrokeColor_textView" />

        <SeekBar
            android:id="@+id/editStrokeWidth_seekbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"

            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.538"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editStrokeWidth_textView" />

        <TextView
            android:id="@+id/editStrokeWidth_textView_percent"
            android:layout_width="50dp"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="100%"

            app:layout_constraintBottom_toBottomOf="@id/editStrokeWidth_textView"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/editStrokeWidth_textView" />

        <!-- STROKE COLOR VERSION -->
        <fr.spse.extended_view.ExtendedTextView
            android:id="@+id/editStrokeColor_textView"
            android:layout_width="0dp"
            android:layout_height="35dp"
            android:background="?attr/selectableItemBackground"
            android:drawableEnd="@drawable/spinner_arrow_right"
            android:gravity="center_vertical"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_stroke_color"
            app:drawableEndIntegerScaling="true"
            app:drawableEndSize="20dp"

            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editBackgroundColor_textView" />


        <!-- CORNER RADIUS SECTION -->
        <TextView
            android:id="@+id/editCornerRadius_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_corner_radius"


            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editStrokeWidth_seekbar" />

        <SeekBar
            android:id="@+id/editCornerRadius_seekbar"
            android:layout_width="0dp"
            android:layout_height="30dp"


            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editCornerRadius_textView" />

        <TextView
            android:id="@+id/editCornerRadius_textView_percent"
            android:layout_width="50dp"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="100%"

            app:layout_constraintBottom_toBottomOf="@id/editCornerRadius_textView"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/editCornerRadius_textView" />

        <!-- BUTTON OPACITY SECTION -->
        <TextView
            android:id="@+id/editButtonOpacity_textView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingEnd="5dp"
            android:text="@string/customctrl_button_opacity"


            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/editCornerRadius_seekbar" />

        <SeekBar
            android:id="@+id/editButtonOpacity_seekbar"
            android:layout_width="0dp"
            android:layout_height="30dp"

            app:layout_constraintBottom_toBottomOf="parent"

            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/editButtonOpacity_textView" />

        <TextView
            android:id="@+id/editButtonOpacity_textView_percent"
            android:layout_width="50dp"
            android:layout_height="0dp"
            android:gravity="center"
            android:text="100%"

            app:layout_constraintBottom_toBottomOf="@id/editButtonOpacity_textView"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/editButtonOpacity_textView" />


    </androidx.constraintlayout.widget.ConstraintLayout>

</com.kdt.DefocusableScrollView>