<?xml version="1.0" encoding="utf-8"?><!--
  ~ Kiwix Android
  ~ Copyright (c) 2020 Kiwix <android.kiwix.org>
  ~ 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/>.
  ~
  -->


<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"
  android:fitsSystemWindows="true">

  <org.kiwix.kiwixmobile.core.utils.NestedCoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <com.google.android.material.appbar.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content">

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

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


    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
      android:id="@+id/zim_swiperefresh"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior">

      <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
          android:id="@+id/zimfilelist"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:contentDescription="@string/crash_checkbox_zimfiles"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@+id/scanning_progress_view"
          tools:listitem="@layout/item_book" />

        <androidx.core.widget.ContentLoadingProgressBar
          android:id="@+id/scanning_progress_view"
          style="?android:attr/progressBarStyleHorizontal"
          android:layout_width="match_parent"
          android:layout_height="4dp"
          android:indeterminate="false"
          android:max="100"
          android:theme="@style/ThemeOverlay.KiwixTheme.ProgressBar"
          android:visibility="gone"
          app:layout_constraintTop_toTopOf="parent"
          tools:progress="0" />
      </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

  </org.kiwix.kiwixmobile.core.utils.NestedCoordinatorLayout>

  <TextView
    android:id="@+id/file_management_no_files"
    style="@style/no_content"
    android:text="@string/no_files_here"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintVertical_bias="0.45"
    tools:ignore="RequiredSize" />

  <Button
    android:id="@+id/go_to_downloads_button_no_files"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="8dp"
    android:text="@string/download_books"
    android:visibility="gone"
    app:layout_constraintEnd_toEndOf="@+id/file_management_no_files"
    app:layout_constraintStart_toStartOf="@+id/file_management_no_files"
    app:layout_constraintTop_toBottomOf="@+id/file_management_no_files" />

  <com.google.android.material.floatingactionbutton.FloatingActionButton
    android:id="@+id/select_file"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginEnd="10dp"
    android:layout_marginBottom="66dp"
    android:contentDescription="@string/select_zim_file"
    android:src="@drawable/ic_add_blue_24dp"
    app:backgroundTint="@color/black"
    app:fabSize="auto"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
