<?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/rootConstraintLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/roomToolbar"
        style="@style/VectorToolbarStyle"
        android:layout_width="0dp"
        android:layout_height="?actionBarSize"
        android:elevation="4dp"
        android:transitionName="toolbar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

            <ImageView
                android:id="@+id/roomToolbarAvatarImageView"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:src="@tools:sample/avatars" />

            <TextView
                android:id="@+id/roomToolbarTitleView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="8dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?vctr_toolbar_primary_text_color"
                android:textSize="18sp"
                app:layout_constraintBottom_toTopOf="@+id/roomToolbarSubtitleView"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toEndOf="@+id/roomToolbarAvatarImageView"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="@sample/matrix.json/data/roomName" />

            <TextView
                android:id="@+id/roomToolbarSubtitleView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginBottom="8dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?vctr_toolbar_secondary_text_color"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toEndOf="@+id/roomToolbarAvatarImageView"
                app:layout_constraintTop_toBottomOf="@+id/roomToolbarTitleView"
                tools:text="@sample/matrix.json/data/roomTopic" />


        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.appcompat.widget.Toolbar>

    <im.vector.riotx.features.sync.widget.SyncStateView
        android:id="@+id/syncStateView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/roomToolbar" />

    <com.airbnb.epoxy.EpoxyRecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:overScrollMode="always"
        app:layout_constraintBottom_toTopOf="@+id/recyclerViewBarrier"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/syncStateView"
        tools:listitem="@layout/item_timeline_event_base" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/recyclerViewBarrier"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="top"
        app:constraint_referenced_ids="composerLayout,notificationAreaView" />

    <im.vector.riotx.features.home.room.detail.composer.TextComposerView
        android:id="@+id/composerLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?riotx_background"
        android:transitionName="composer"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <im.vector.riotx.core.ui.views.NotificationAreaView
        android:id="@+id/notificationAreaView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <im.vector.riotx.features.invite.VectorInviteView
        android:id="@+id/inviteView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="?riotx_background"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/roomToolbar"
        tools:visibility="visible" />


</androidx.constraintlayout.widget.ConstraintLayout>