<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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:id="@+id/card_view"
    style="@style/list_item_card_view_box"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:cardElevation="@dimen/matter_8dp"
    app:cardUseCompatPadding="false">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            style="@style/list_item_card_view_container_margins"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical">

                <ImageView
                    android:id="@+id/manufacturer_icon"
                    android:layout_width="38dp"
                    android:layout_height="38dp"
                    android:contentDescription="@string/content_desc_scanned_device_manufacturer_icon"
                    android:src="@drawable/redesign_ic_scanned_device_windows" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/space_XS"
                    android:layout_weight="1"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/device_name"
                        style="@style/list_item_card_view_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/devices_list_list_item_default_device_name" />

                    <TextView
                        android:id="@+id/tv_device_address"
                        style="@style/list_item_card_view_text_info"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/Device_address" />

                </LinearLayout>

                <com.siliconlabs.bledemo.common.views.ActionButton
                    android:id="@+id/connection_btn"
                    style="@style/button_browser_device_connect"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:minHeight="@dimen/card_view_main_icon_dimension"
                    tools:text="@string/button_connect" />

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="@dimen/space_XS"
                android:layout_marginBottom="@dimen/space_XS"
                android:background="?android:attr/listDivider" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="@dimen/card_view_feature_icon_dimension"
                        android:layout_height="@dimen/card_view_feature_icon_dimension"
                        android:layout_gravity="center"
                        android:contentDescription="@string/advertiser_label_tx_power"
                        android:src="@drawable/redesign_ic_wifi"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/rssi"
                        style="@style/list_item_card_view_text_info_ellipsized"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_horizontal"
                        tools:text="-40 dBm" />

                </LinearLayout>

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="@dimen/card_view_feature_icon_dimension"
                        android:layout_height="@dimen/card_view_feature_icon_dimension"
                        android:layout_gravity="center_horizontal"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/redesign_ic_clock"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_interval"
                        style="@style/list_item_card_view_text_info_ellipsized"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_horizontal"
                        tools:text="325 ms" />

                </LinearLayout>


                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="@dimen/card_view_feature_icon_dimension"
                        android:layout_height="@dimen/card_view_feature_icon_dimension"
                        android:layout_gravity="center_horizontal"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/ic_beacon_ibeacon"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/device_type"
                        style="@style/list_item_card_view_text_info_stat"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/advertiser_setting_beacon_unspecified" />

                </LinearLayout>

                <View
                    android:layout_width="1dp"
                    android:layout_height="match_parent"
                    android:layout_marginHorizontal="@dimen/card_view_vertical_separator_horizontal_margin"
                    android:background="?android:attr/listDivider" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1.2"
                    android:orientation="vertical"
                    tools:ignore="UseCompoundDrawables">

                    <ImageView
                        android:layout_width="@dimen/card_view_feature_icon_dimension"
                        android:layout_height="@dimen/card_view_feature_icon_dimension"
                        android:layout_gravity="center_horizontal"
                        android:contentDescription="@string/advertiser_label_interval"
                        android:src="@drawable/redesign_ic_bluetooth"
                        app:tint="@color/silabs_dark_gray_icon" />

                    <TextView
                        android:id="@+id/tv_is_connectable"
                        style="@style/list_item_card_view_text_info_stat"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        tools:text="Connectible" />

                </LinearLayout>

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginVertical="@dimen/space_XS"
                android:background="?android:attr/listDivider" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/card_view_margin_vertical">

                <com.google.android.material.checkbox.MaterialCheckBox
                    android:id="@+id/favorite_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:backgroundTint="@color/silabs_white"
                    android:button="@drawable/fav_star"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/tv_is_bonded"
                    style="@style/list_item_card_view_text_info"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/expand_arrow"
                    app:layout_constraintStart_toEndOf="@id/favorite_btn"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:ignore="RelativeOverlap"
                    tools:text="Bonded" />

                <com.siliconlabs.bledemo.common.views.ExpandArrow
                    android:id="@+id/expand_arrow"
                    style="@style/Widget.Material3.Button.IconButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:layout_centerVertical="true"
                    android:contentDescription="@string/content_desc_dropdown_arrow"
                    android:src="@drawable/ic_arrow_down_on"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/advertisement_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" />

    </LinearLayout>

</com.google.android.material.card.MaterialCardView>

