<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/thread_message_holder"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/medium_margin"
    android:layout_marginBottom="@dimen/medium_margin"
    android:foreground="@drawable/selector"
    android:paddingStart="@dimen/activity_margin"
    android:paddingEnd="@dimen/activity_margin">

    <RelativeLayout
        android:id="@+id/thread_message_wrapper"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.8">

        <ImageView
            android:id="@+id/thread_message_sender_photo"
            android:layout_width="@dimen/list_avatar_size"
            android:layout_height="@dimen/list_avatar_size"
            android:layout_alignBottom="@+id/thread_message_body"
            android:layout_alignParentStart="true"
            android:layout_marginEnd="@dimen/medium_margin"
            android:visibility="gone" />

        <LinearLayout
            android:id="@+id/thread_mesage_attachments_holder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toEndOf="@+id/thread_message_sender_photo"
            android:divider="@drawable/linear_layout_vertical_divider"
            android:orientation="vertical"
            android:showDividers="middle" />

        <ImageView
            android:id="@+id/thread_message_play_outline"
            android:layout_width="@dimen/play_outline_size"
            android:layout_height="@dimen/play_outline_size"
            android:layout_alignEnd="@+id/thread_mesage_attachments_holder"
            android:layout_alignBottom="@+id/thread_mesage_attachments_holder"
            android:layout_marginStart="@dimen/medium_margin"
            android:layout_marginBottom="@dimen/activity_margin"
            android:src="@drawable/ic_play_outline_vector"
            android:visibility="gone" />

        <TextView
            android:id="@+id/thread_message_body"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/thread_mesage_attachments_holder"
            android:layout_toEndOf="@+id/thread_message_sender_photo"
            android:autoLink="email|web"
            android:background="@drawable/item_received_background"
            android:padding="@dimen/normal_margin"
            android:textSize="@dimen/normal_text_size"
            tools:text="Received message" />
    </RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
