<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/item_bg"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical">

    <androidx.cardview.widget.CardView
        android:id="@+id/card_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/cardview_margin"
        app:cardCornerRadius="5dp">

        <LinearLayout
            android:id="@+id/info_container"
            android:layout_width="match_parent"
            android:layout_height="@dimen/server_height"
            android:layout_gravity="center"
            android:clickable="true"
            android:focusable="true"
            android:background="?attr/selectableItemBackground"
            android:gravity="center"
            android:nextFocusRight="@+id/layout_share"
            android:orientation="horizontal">

            <LinearLayout
                android:id="@+id/layout_indicator"
                android:layout_width="6dp"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:orientation="vertical" />

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

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

                    <TextView
                        android:id="@+id/tv_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:maxLines="2"
                        android:minLines="1"
                        android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="0dp"
                        android:layout_weight="1" />

                    <TextView
                        android:id="@+id/tv_statistics"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:lines="1"
                        android:textAppearance="@style/TextAppearance.AppCompat.Small"
                        android:textSize="12sp" />

                </LinearLayout>

            </LinearLayout>

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:paddingEnd="@dimen/padding_end">

                    <TextView
                        android:id="@+id/tv_subscription"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:lines="1"
                        android:textAppearance="@style/TextAppearance.AppCompat.Small"
                        android:textColor="@color/color_secondary"
                        android:textSize="10sp"
                        tools:text="Sub" />

                    <TextView
                        android:id="@+id/tv_test_result"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:lines="1"
                        android:textAppearance="@style/TextAppearance.AppCompat.Small"
                        android:textColor="@color/colorPing"
                        android:textSize="10sp"
                        tools:text="214ms" />
                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:id="@+id/layout_share"
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/server_height"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:clickable="true"
                        android:focusable="true"
                        android:gravity="center"
                        android:nextFocusLeft="@+id/info_container"
                        android:orientation="vertical"
                        android:padding="@dimen/layout_margin_spacing">

                        <ImageView
                            android:layout_width="wrap_content"
                            android:layout_height="@dimen/png_height"
                            app:srcCompat="@drawable/ic_share_24dp" />

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/layout_edit"
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/server_height"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:clickable="true"
                        android:focusable="true"
                        android:gravity="center"
                        android:orientation="vertical"
                        android:padding="@dimen/layout_margin_spacing">

                        <ImageView
                            android:layout_width="@dimen/png_height"
                            android:layout_height="@dimen/png_height"
                            app:srcCompat="@drawable/ic_edit_24dp" />

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/layout_remove"
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/server_height"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:clickable="true"
                        android:focusable="true"
                        android:gravity="center"
                        android:orientation="vertical"
                        android:padding="@dimen/layout_margin_spacing">

                        <ImageView
                            android:layout_width="@dimen/png_height"
                            android:layout_height="@dimen/png_height"
                            app:srcCompat="@drawable/ic_delete_24dp" />

                    </LinearLayout>
                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:orientation="vertical"
                    android:paddingEnd="@dimen/padding_end">

                    <TextView
                        android:id="@+id/tv_type"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:lines="1"
                        android:textAppearance="@style/TextAppearance.AppCompat.Small"
                        android:textColor="@color/colorConfigType"
                        android:textSize="10sp" />
                </LinearLayout>

            </LinearLayout>
        </LinearLayout>

    </androidx.cardview.widget.CardView>
</LinearLayout>
