<?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="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginHorizontal="@dimen/fab_margin"
    android:layout_marginTop="12dp"
    android:padding="12dp">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/user_pp"
        android:layout_width="28dp"
        android:layout_height="28dp"
        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.Subtitle2"
        android:layout_width="0dp"
        android:layout_marginEnd="6dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="10dp"
        app:layout_constraintEnd_toStartOf="@+id/visibility"
        app:layout_constraintStart_toEndOf="@+id/user_pp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@+id/date"
        tools:text="@tools:sample/full_names" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/visibility"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="4dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/user_name"
        app:layout_constraintBottom_toTopOf="@+id/date"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:src="@drawable/ic_baseline_public_24"
        tools:visibility="visible" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/date"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="6dp"
        android:gravity="end"
        app:layout_constraintBottom_toTopOf="@+id/message_content"
        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_marginEnd="6dp"
        android:layout_marginTop="6dp"
        app:layout_constraintTop_toBottomOf="@+id/date"
        tools:text="@tools:sample/lorem/random" />

    <com.google.android.material.button.MaterialButton
        android:id="@+id/toggle_truncate"
        style="@style/Widget.Material3.Button.TextButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:drawableEnd="@drawable/ic_display_more"
        android:gravity="center_vertical"
        android:singleLine="true"
        android:text="@string/display_toot_truncate"
        android:textAllCaps="false"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/message_content"
        tools:visibility="visible" />

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toggle_truncate">


        <include
            android:id="@+id/poll"
            layout="@layout/layout_poll"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="48dp"
            android:layout_marginTop="6dp"
            android:layout_marginEnd="6dp" />

        <include
            android:layout_marginTop="10dp"
            android:id="@+id/media"
            layout="@layout/layout_drawer_attachments"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </androidx.appcompat.widget.LinearLayoutCompat>


</androidx.constraintlayout.widget.ConstraintLayout>