<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:scrollHorizontally="false">

    <RelativeLayout
        android:id="@+id/calendar_entry"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toStartOf="@+id/calendar_color_drop_down"
        android:layout_alignParentStart="true"
        android:background="?android:attr/activatedBackgroundIndicator"
        android:minHeight="56dp">

        <CheckBox
            android:id="@+id/item_checkbox"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_alignParentStart="true"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:clickable="false"
            android:focusable="false" />

        <View
            android:id="@+id/calendar_color"
            android:layout_width="32dp"
            android:layout_height="32dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:layout_toEndOf="@+id/item_checkbox"
            android:paddingTop="8dp"
            android:paddingBottom="8dp" />

        <LinearLayout
            android:id="@+id/calendar_text"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@+id/calendar_color"
            android:orientation="vertical"
            android:padding="8dp">

            <TextView
                android:id="@+id/calendar_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:maxLines="1"
                android:scrollHorizontally="false"
                android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />

            <TextView
                android:id="@+id/calendar_owner_account"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:maxLines="1"
                android:scrollHorizontally="false"
                android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                android:textSize="12sp" />
        </LinearLayout>
    </RelativeLayout>

    <ImageView
        android:id="@+id/calendar_color_drop_down"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentEnd="true"
        android:layout_marginTop="4dp"
        android:background="?android:attr/selectableItemBackground"
        android:focusable="false"
        android:clickable="false"
        android:padding="8dp"
        app:srcCompat="@drawable/ic_more_vert" />
</RelativeLayout>
