<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ F7cloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 Marcel Hibbe <dev@mhibbe.de>
  ~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<LinearLayout 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"
    android:orientation="vertical"
    android:animateLayoutChanges="true">

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

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/open_conversations_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/appbar"
            android:theme="?attr/actionBarPopupTheme"
            app:title="@string/openConversations"
            app:layout_scrollFlags="scroll|enterAlways"
            app:navigationIconTint="@color/fontAppbar"
            app:popupTheme="@style/appActionBarPopupMenu"
            app:titleTextColor="@color/fontAppbar" >

            <ImageView
                android:id="@+id/search_open_conversations"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/search_icon"
                android:layout_gravity="end"
                android:layout_marginHorizontal="@dimen/standard_margin"
                android:src="@drawable/ic_search_white_24dp" />

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/textInputLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:endIconMode="clear_text"
                app:boxBackgroundMode="none"
                android:visibility="gone"
                tools:visibility="visible"
                app:hintEnabled="false"
                app:endIconTint="@color/icon_on_bg_default"
                android:layout_marginEnd = "8dp">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/editText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/nc_search"
                    android:textColorHint="@color/low_emphasis_text"
                    android:singleLine="true"
                    android:textColor = "@color/high_emphasis_text"/>
            </com.google.android.material.textfield.TextInputLayout>
        </com.google.android.material.appbar.MaterialToolbar>

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

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/open_conversations_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layoutManager="LinearLayoutManager" />

    <LinearLayout
        android:id="@+id/progress_bar_wrapper"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:visibility="gone">
        <ProgressBar
            style="?android:attr/progressBarStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"/>
    </LinearLayout>

    <include
        android:id="@+id/emptyList"
        layout="@layout/empty_list" />

</LinearLayout>
