<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2018 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-License-Identifier: AGPL-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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/standard_padding"
        android:layout_marginEnd="@dimen/zero"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/avatar"
            android:layout_width="@dimen/activity_icon_width"
            android:layout_height="@dimen/activity_icon_height"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="@dimen/zero"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="@dimen/standard_half_margin"
            android:contentDescription="@null"
            tools:src="@drawable/ic_user" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/commentInputField_container"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:paddingTop="@dimen/standard_padding"
            android:hint="@string/new_comment">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/commentInputField"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textNoSuggestions|textCapSentences"
                android:scrollbars="vertical">

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

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

        <com.google.android.material.button.MaterialButton
            android:id="@+id/submitComment"
            style="@style/Widget.AppTheme.Button.IconButton"
            android:layout_width="@dimen/minimum_size_for_touchable_area"
            android:layout_height="@dimen/minimum_size_for_touchable_area"
            android:contentDescription="@string/common_send"
            app:cornerRadius="24dp"
            app:icon="@drawable/ic_send"
            app:iconTint="@color/grey_600"/>

    </LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
            android:id="@+id/swipe_containing_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:footerDividersEnabled="false"
            android:visibility="visible">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@android:id/list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="-3dp"
                android:layout_marginRight="-3dp"
                android:layout_marginBottom="-3dp"
                android:background="@color/bg_default"
                android:clipToPadding="false"
                android:scrollbarStyle="outsideOverlay"
                android:scrollbars="vertical"
                android:visibility="visible"
                tools:listitem="@layout/activity_list_item" />

        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
            android:id="@+id/swipe_containing_empty"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:footerDividersEnabled="false"
            android:visibility="visible">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout
                    android:id="@+id/loading_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:visibility="visible">

                    <include layout="@layout/activity_list_item_shimmer" />

                    <include layout="@layout/activity_list_item_shimmer" />

                    <include layout="@layout/activity_list_item_shimmer" />

                </LinearLayout>

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

            </FrameLayout>
        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

    </FrameLayout>

</LinearLayout>
