<?xml version="1.0" encoding="utf-8"?><!--
  ~ Nextcloud Talk application
  ~
  ~ @author Mario Danic
  ~ @author Andy Scherzinger
  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
  ~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:apc="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">

    <ProgressBar
        android:id="@+id/progressBar"
        android:layout_width="@dimen/item_height"
        android:layout_height="@dimen/item_height"
        android:layout_centerInParent="true"
        android:layout_marginStart="@dimen/activity_horizontal_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginEnd="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        android:indeterminate="true"
        android:indeterminateTint="@color/textColorMaxContrast"
        android:indeterminateTintMode="src_in" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/conversation_info_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:animateLayoutChanges="true"
                android:visibility="gone"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                tools:visibility="visible">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <androidx.emoji.widget.EmojiTextView
                        android:id="@+id/display_name_text"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/avatar_image"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="@dimen/margin_between_elements"
                        tools:text="Jane Doe" />

                    <com.facebook.drawee.view.SimpleDraweeView
                        android:id="@+id/avatar_image"
                        android:layout_width="@dimen/avatar_size_big"
                        android:layout_height="@dimen/avatar_size_big"
                        android:layout_centerHorizontal="true"
                        apc:roundAsCircle="true" />

                </RelativeLayout>
            </com.yarolegovich.mp.MaterialPreferenceCategory>

            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/conversation_description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/conversation_info_name"
                android:animateLayoutChanges="true"
                android:visibility="gone"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                tools:visibility="visible">

                <androidx.emoji.widget.EmojiTextView
                    android:id="@+id/description_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerHorizontal="true"
                    android:layout_margin="@dimen/standard_margin"
                    android:layout_marginTop="@dimen/margin_between_elements"
                    android:autoLink="web"
                    tools:text="Hello world!" />
            </com.yarolegovich.mp.MaterialPreferenceCategory>

            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/otherRoomOptions"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/conversation_description"
                android:visibility="gone"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                tools:visibility="visible">

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/favoriteConversationAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_star_black_24dp"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_add_to_favorites">

                </com.yarolegovich.mp.MaterialStandardPreference>

            </com.yarolegovich.mp.MaterialPreferenceCategory>

            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/participants_list_category"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/category_shared_items"
                android:visibility="gone"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                apc:mpc_title="@string/nc_participants"
                tools:ignore="UnknownIdInLayout"
                tools:visibility="visible">

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/addParticipantsAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_account_plus"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_participants_add" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    tools:listitem="@layout/rv_item_conversation_info_participant" />

            </com.yarolegovich.mp.MaterialPreferenceCategory>

            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/ownOptions"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/participants_list_category"
                android:visibility="gone"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                tools:visibility="visible">

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/leaveConversationAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_exit_to_app_black_24dp"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_leave" />

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/clearConversationHistory"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_delete_black_24dp"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_clear_history" />

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/deleteConversationAction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_delete_black_24dp"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_delete_call" />

            </com.yarolegovich.mp.MaterialPreferenceCategory>

            <LinearLayout
                android:id="@+id/settings"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/otherRoomOptions"
                android:orientation="vertical">

                <include
                    android:id="@+id/notification_settings_view"
                    layout="@layout/notification_settings_item"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    tools:visibility="gone" />

                <include
                    android:id="@+id/webinar_info_view"
                    layout="@layout/webinar_info_item"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    tools:visibility="visible" />

            </LinearLayout>


            <com.yarolegovich.mp.MaterialPreferenceCategory
                android:id="@+id/category_shared_items"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/settings"
                android:animateLayoutChanges="true"
                apc:cardBackgroundColor="@color/bg_default"
                apc:cardElevation="0dp"
                apc:mpc_title="@string/nc_shared_items">

                <com.yarolegovich.mp.MaterialStandardPreference
                    android:id="@+id/show_shared_items_action"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    apc:mp_icon="@drawable/ic_folder_multiple_image"
                    apc:mp_icon_tint="@color/grey_600"
                    apc:mp_title="@string/nc_shared_items_description" />

            </com.yarolegovich.mp.MaterialPreferenceCategory>

        </RelativeLayout>
    </ScrollView>
</RelativeLayout>
