<?xml version="1.0" encoding="utf-8"?>
<!--
  Nextcloud Android client application

  Copyright (C) 2018 Andy Scherzinger

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  License as published by the Free Software Foundation; either
  version 3 of the License, or 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 AFFERO GENERAL PUBLIC LICENSE for more details.

  You should have received a copy of the GNU Affero General Public
  License along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              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_marginEnd="@dimen/zero"
        android:layout_marginStart="@dimen/standard_padding"
        android:orientation="horizontal">

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

        <ImageButton
            android:id="@+id/submitComment"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/common_send"
            android:paddingBottom="@dimen/standard_padding"
            android:paddingEnd="@dimen/standard_padding"
            android:paddingLeft="@dimen/standard_padding"
            android:paddingRight="@dimen/standard_padding"
            android:paddingStart="@dimen/standard_padding"
            android:paddingTop="@dimen/standard_padding"
            android:src="@drawable/ic_send" />
    </LinearLayout>

    <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:clipToPadding="false"
            android:scrollbarStyle="outsideOverlay"
            android:scrollbars="vertical"
            android:visibility="visible"/>

    </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">

        <include layout="@layout/empty_list"/>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

</LinearLayout>
