<?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/mainContainer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/fab_margin"
    android:layout_marginTop="12dp"
    android:background="@drawable/bubble_right_tail"
    android:padding="6dp"
    android:paddingEnd="12dp">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/user_pp"
        android:layout_width="50dp"
        android:layout_height="50dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:src="@tools:sample/avatars" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/user_name"
        style="@style/TextAppearance.MaterialComponents.Headline6"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="10dp"
        android:textColor="?attr/colorOnPrimary"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/user_pp"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="@tools:sample/full_names" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/date"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="10dp"
        android:gravity="end"
        android:textColor="?attr/colorOnPrimary"
        app:layout_constraintBottom_toBottomOf="@+id/user_pp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/user_pp"
        app:layout_constraintTop_toBottomOf="@+id/user_name"
        tools:text="@tools:sample/date/ddmmyy" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/message_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:maxLines="10"
        android:textColor="?attr/colorOnPrimary"
        app:layout_constraintTop_toBottomOf="@+id/user_pp"
        tools:text="@tools:sample/lorem/random" />

    <include
        android:id="@+id/media"
        layout="@layout/layout_drawer_attachments"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        app:layout_constraintTop_toBottomOf="@id/message_content" />

</androidx.constraintlayout.widget.ConstraintLayout>