<?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: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/userListToolbar"
            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/userListClose"
                    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/userListTitle"
                    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/fab_menu_create_chat"
                    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/userListClose"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

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

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

    <im.vector.app.core.platform.MaxHeightScrollView
        android:id="@+id/chipGroupScrollView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="@dimen/layout_horizontal_margin"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
        app:maxHeight="64dp">

        <com.google.android.material.chip.ChipGroup
            android:id="@+id/chipGroup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:lineSpacing="2dp" />

    </im.vector.app.core.platform.MaxHeightScrollView>

    <EditText
        android:id="@+id/userListSearch"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/layout_horizontal_margin"
        android:layout_marginEnd="@dimen/layout_horizontal_margin"
        android:background="@null"
        android:drawablePadding="8dp"
        android:gravity="center_vertical"
        android:hint="@string/user_directory_search_hint_2"
        android:importantForAutofill="no"
        android:inputType="text"
        android:maxHeight="80dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/chipGroupScrollView" />

    <View
        android:id="@+id/userListFilterDivider"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="?vctr_list_separator"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/userListSearch" />


    <TextView
        android:id="@+id/userListE2EbyDefaultDisabled"
        style="@style/Widget.Vector.TextView.Body"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:drawablePadding="8dp"
        android:text="@string/settings_hs_admin_e2e_disabled"
        android:textColor="?vctr_content_secondary"
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@id/userListFilterDivider"
        tools:visibility="visible" />

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

</androidx.constraintlayout.widget.ConstraintLayout>