<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    style="@style/dialog_card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/dialog_margin_top"
    android:layout_marginBottom="@dimen/dialog_margin_bottom">

    <LinearLayout
        style="@style/dialog_margins"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/dialog_margin_horizontal"
        android:minWidth="300dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_header"
            style="@style/dialog_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/dialog_title_margin_bottom"
            android:text="@string/gatt_configurator_title_add_a_gatt_characteristic" />

        <ScrollView
            android:id="@+id/sv_characteristic_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scrollbars="vertical">

            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@color/silabs_white">

                <LinearLayout
                    android:id="@+id/ll_characteristic_name_uuid"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="16dp"
                    android:orientation="vertical">

                    <AutoCompleteTextView
                        android:id="@+id/actv_characteristic_name"
                        style="@style/EditTextSmall"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/gatt_configurator_hint_characteristic_name"
                        android:popupTheme="@style/ThemeOverlay.Silabs.DropdownList" />

                    <AutoCompleteTextView
                        android:id="@+id/actv_characteristic_uuid"
                        style="@style/EditTextSmall"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:digits="0123456789ABCDEFabcdef-"
                        android:hint="@string/gatt_configurator_hint_16_128_bit_uuid"
                        android:maxLength="36"
                        android:popupTheme="@style/ThemeOverlay.Silabs.DropdownList" />
                </LinearLayout>

                <include
                    android:id="@+id/properties_content"
                    layout="@layout/dialog_add_characteristic_properties_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/ll_characteristic_name_uuid"
                    android:layout_marginTop="16dp" />

                <include
                    android:id="@+id/initial_value"
                    layout="@layout/gatt_configurator_initial_value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/properties_content" />

            </RelativeLayout>
        </ScrollView>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/ll_buttons"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="@dimen/dialog_button_margin_top"
            android:orientation="horizontal">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_clear"
                style="@style/button_add_data_outlined"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/button_clear"
                app:cornerRadius="@dimen/silabs_btn_radius"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_cancel"
                style="@style/button_add_data_outlined"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dialog_margin_between_buttons"
                android:text="@string/button_cancel"
                app:cornerRadius="@dimen/silabs_btn_radius"
                app:layout_constraintStart_toEndOf="@id/btn_clear"
                app:layout_constraintTop_toTopOf="parent" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_save"
                style="@style/Widget.MaterialComponents.Button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dialog_margin_between_buttons"
                android:enabled="false"
                android:text="@string/button_save"
                android:textAllCaps="false"
                android:textColor="@color/silabs_white"
                app:textAllCaps="false"
                app:backgroundTint="@color/gatt_configurator_save_button_background_tint"
                app:cornerRadius="@dimen/silabs_btn_radius"
                app:layout_constraintStart_toEndOf="@id/btn_cancel"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </LinearLayout>
</androidx.cardview.widget.CardView>