<?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:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:background="@drawable/list_item_background_selectable"
	android:orientation="vertical"
	android:paddingTop="@dimen/message_bubble_margin">

	<include layout="@layout/list_item_conversation_top_notice_out" />

	<androidx.constraintlayout.widget.ConstraintLayout
		android:id="@+id/layout"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_gravity="right|end"
		android:layout_marginStart="@dimen/message_bubble_margin_non_tail"
		android:layout_marginLeft="@dimen/message_bubble_margin_non_tail"
		android:layout_marginTop="@dimen/message_bubble_margin"
		android:layout_marginEnd="@dimen/message_bubble_margin_tail"
		android:layout_marginRight="@dimen/message_bubble_margin_tail"
		android:layout_marginBottom="@dimen/message_bubble_margin"
		android:background="@drawable/msg_out"
		android:elevation="@dimen/message_bubble_elevation">

		<androidx.recyclerview.widget.RecyclerView
			android:id="@+id/imageList"
			android:layout_width="@dimen/message_bubble_image_default"
			android:layout_height="@dimen/message_bubble_image_default"
			android:orientation="vertical"
			android:visibility="gone"
			app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
			app:layout_constraintBottom_toTopOf="@+id/text"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:spanCount="2"
			tools:ignore="ContentDescription"
			tools:src="@drawable/alerts_and_states_error" />

		<com.vanniktech.emoji.EmojiTextView
			android:id="@+id/text"
			style="@style/TextMessage"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginLeft="@dimen/message_bubble_padding_sides_inner"
			android:layout_marginTop="@dimen/message_bubble_padding_top_inner"
			android:layout_marginRight="@dimen/message_bubble_padding_sides_inner"
			android:layout_marginBottom="@dimen/message_bubble_padding_bottom_inner"
			android:textColor="@color/briar_text_primary_inverse"
			app:layout_constrainedWidth="true"
			app:layout_constraintBottom_toTopOf="@+id/statusLayout"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintHorizontal_bias="0.0"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/imageList"
			tools:text="This is a long long long message that spans over several lines.\n\nIt ends here." />

		<LinearLayout
			android:id="@+id/statusLayout"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginLeft="@dimen/message_bubble_padding_sides_inner"
			android:layout_marginRight="@dimen/message_bubble_padding_sides_inner"
			android:layout_marginBottom="@dimen/message_bubble_padding_bottom_inner"
			android:orientation="horizontal"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintHorizontal_bias="0.0"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/text"
			tools:ignore="UseCompoundDrawables">

			<TextView
				android:id="@+id/time"
				style="@style/TextMessage.Timestamp"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_marginEnd="4dp"
				android:layout_marginRight="4dp"
				android:textColor="@color/private_message_date_inverse"
				tools:text="Dec 24, 13:37" />

			<ImageView
				android:id="@+id/bomb"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_marginEnd="4dp"
				android:layout_marginRight="4dp"
				app:srcCompat="@drawable/ic_bomb"
				app:tint="@color/private_message_date_inverse"
				tools:ignore="ContentDescription" />

			<ImageView
				android:id="@+id/status"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				app:tint="@color/private_message_date_inverse"
				tools:ignore="ContentDescription"
				tools:src="@drawable/message_delivered" />

		</LinearLayout>

	</androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>