<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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/coordinatorLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appBarLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toTopOf="parent">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/userDirectoryToolbar"
                android:layout_width="match_parent"
                android:layout_height="?actionBarSize">

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

                    <ImageView
                        android:id="@+id/userDirectoryClose"
                        android:layout_width="@dimen/layout_touch_size"
                        android:layout_height="@dimen/layout_touch_size"
                        android:clickable="true"
                        android:contentDescription="@string/action_close"
                        android:focusable="true"
                        android:foreground="?attr/selectableItemBackground"
                        android:scaleType="center"
                        android:src="@drawable/ic_x_18dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:tint="?vctr_content_secondary"
                        tools:ignore="MissingPrefix" />

                    <TextView
                        android:id="@+id/userDirectoryTitle"
                        style="@style/Widget.Vector.TextView.HeadlineMedium"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginEnd="8dp"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:text="@string/direct_chats_header"
                        android:textColor="?vctr_content_primary"
                        android:textStyle="bold"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="0.0"
                        app:layout_constraintStart_toEndOf="@+id/userDirectoryClose"
                        app:layout_constraintTop_toTopOf="parent" />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </com.google.android.material.appbar.MaterialToolbar>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/userDirectorySearchByIdContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/layout_horizontal_margin"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="@dimen/layout_horizontal_margin"
                android:layout_marginBottom="16dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/appBarLayout">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/userDirectorySearchById"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/add_by_matrix_id" />

            </com.google.android.material.textfield.TextInputLayout>

        </com.google.android.material.appbar.AppBarLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/userDirectoryRecyclerView"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:fastScrollEnabled="true"
            android:overScrollMode="always"
            android:scrollbars="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
            tools:listitem="@layout/item_known_user" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

