<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:background="?attr/selectableItemBackground"
	android:clickable="true"
	android:focusable="true"
	android:orientation="vertical">

	<RelativeLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:paddingBottom="@dimen/listitem_horizontal_margin"
		android:paddingTop="@dimen/listitem_horizontal_margin">

		<FrameLayout
			android:id="@+id/avatarFrameView"
			android:layout_width="@dimen/listitem_picture_frame_size"
			android:layout_height="@dimen/listitem_picture_frame_size"
			android:layout_alignParentLeft="true"
			android:layout_alignParentStart="true"
			android:layout_centerVertical="true"
			android:layout_marginLeft="@dimen/listitem_horizontal_margin"
			android:layout_marginStart="@dimen/listitem_horizontal_margin">

			<de.hdodenhof.circleimageview.CircleImageView
				android:id="@+id/avatarView"
				style="@style/BriarAvatar"
				android:layout_width="@dimen/listitem_picture_size"
				android:layout_height="@dimen/listitem_picture_size"
				android:layout_gravity="bottom|left"
				tools:src="@mipmap/ic_launcher_round"/>

			<TextView
				android:id="@+id/unreadCountView"
				android:layout_width="wrap_content"
				android:layout_height="@dimen/unread_bubble_size"
				android:layout_gravity="right|top"
				android:background="@drawable/bubble"
				android:gravity="center"
				android:minWidth="@dimen/unread_bubble_size"
				android:textColor="@color/briar_text_primary_inverse"
				android:textSize="@dimen/unread_bubble_text_size"
				android:textStyle="bold"
				tools:text="123"/>

		</FrameLayout>

		<LinearLayout
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_centerVertical="true"
			android:layout_marginLeft="@dimen/listitem_horizontal_margin"
			android:layout_marginStart="@dimen/listitem_horizontal_margin"
			android:layout_toEndOf="@+id/avatarFrameView"
			android:layout_toLeftOf="@+id/bulbView"
			android:layout_toRightOf="@+id/avatarFrameView"
			android:orientation="vertical">

			<org.thoughtcrime.securesms.components.emoji.EmojiTextView
				android:id="@+id/nameView"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:maxLines="2"
				android:textColor="?android:attr/textColorPrimary"
				android:textSize="@dimen/text_size_medium"
				tools:text="This is a name of a contact"/>

			<TextView
				android:id="@+id/dateView"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:textColor="?android:attr/textColorSecondary"
				android:textSize="@dimen/text_size_small"
				tools:text="Dec 24"/>

		</LinearLayout>

		<ImageView
			android:id="@+id/bulbView"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_alignParentEnd="true"
			android:layout_alignParentRight="true"
			android:layout_centerVertical="true"
			android:layout_marginRight="@dimen/listitem_horizontal_margin"
			tools:src="@drawable/contact_connected"/>

	</RelativeLayout>

	<View style="@style/Divider.ContactList"/>

</LinearLayout>