<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="4dp"
    android:clipToPadding="false"
    android:contentDescription="Message delivery status"
    android:elevation="2dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.chip.Chip
            android:id="@+id/username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:text="@string/some_username"
            app:chipIcon="@drawable/ic_twotone_person_24"
            app:layout_constraintEnd_toEndOf="@+id/messageTime"
            app:layout_constraintStart_toStartOf="@+id/messageTime"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/messageText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:autoLink="all"
            android:text="@string/sample_message"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/username"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/messageTime"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:text="3 min"
            app:layout_constraintStart_toStartOf="@+id/username"
            app:layout_constraintTop_toBottomOf="@+id/username" />

        <ImageView
            android:id="@+id/messageStatusIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            app:layout_constraintBottom_toBottomOf="@+id/messageText"
            app:layout_constraintEnd_toEndOf="parent"
            app:srcCompat="@drawable/cloud_on" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>