<?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="46dp"
        android:background="?selectableItemBackground"
        android:orientation="horizontal">

    <FrameLayout
            android:id="@+id/icon_container"
            android:layout_width="15dp"
            android:layout_height="15dp"
            android:layout_alignParentStart="true"
            android:layout_centerVertical="true"
            android:layout_margin="14dp">

        <ImageView
                android:id="@+id/icon"
                android:layout_width="15dp"
                android:layout_height="15dp"
                tools:src="@drawable/ic_service_green"
                app:tint="#999999" />

        <me.zhanghai.android.materialprogressbar.MaterialProgressBar
                android:id="@+id/progress_bar"
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:backgroundTint="#999999"
                android:visibility="gone" />

    </FrameLayout>

    <LinearLayout
            android:layout_height="match_parent"
            android:layout_width="wrap_content"
            android:layout_toEndOf="@+id/icon_container"
            android:layout_toStartOf="@id/sw"
            android:gravity="center_vertical"
            android:layout_marginEnd="5dp"
            android:orientation="vertical">

        <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:textColor="?drawer_item_text_color"
                android:textSize="14sp"
                tools:text="@string/text_a11y_service" />

        <TextView
                android:id="@+id/subtitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:textColor="@color/drawer_item_subtitle_color"
                android:textSize="11sp"
                tools:text="@string/text_sample_string" />

    </LinearLayout>

    <org.autojs.autojs.ui.widget.PrefSwitch
            android:id="@+id/sw"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:layout_marginEnd="10dp"
            android:visibility="gone"
            tools:checked="true"
            tools:visibility="visible" />

</RelativeLayout>