<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
  ~ SPDX-FileCopyrightText: 2020 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2020 Andy Scherzinger <info@andy-scherzinger>
  ~ SPDX-FileCopyrightText: 2015 ownCloud Inc.
  ~ SPDX-FileCopyrightText: 2013 David A. Velasco <dvelasco@solidgear.es>
  ~ SPDX-License-Identifier: GPL-2.0-only AND AGPL-3.0-or-later
-->
<FrameLayout 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:id="@+id/top"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true">

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/live_photo_indicator"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="start|top"
        android:layout_marginStart="@dimen/standard_quarter_margin"
        android:layout_marginTop="@dimen/live_photo_indicator_margin"
        android:background="@drawable/rounded_rect"
        android:backgroundTint="#E5E5E5"
        android:drawablePadding="@dimen/standard_quarter_margin"
        android:gravity="center"
        android:paddingHorizontal="@dimen/live_photo_indicator_horizontal_padding"
        android:paddingVertical="@dimen/live_photo_indicator_vertical_padding"
        android:text="@string/file_list_live"
        android:textColor="@color/black"
        android:translationZ="2dp"
        android:visibility="gone"
        app:drawableStartCompat="@drawable/ic_live_photo"
        tools:visibility="visible" />

    <com.github.chrisbanes.photoview.PhotoView
        android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="@dimen/zero"
        android:contentDescription="@string/preview_image_description"
        android:src="@drawable/image_fail" />

    <LinearLayout
        android:id="@+id/empty_list_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_margin="@dimen/standard_margin"
        android:gravity="center_vertical|center_horizontal"
        android:orientation="vertical"
        android:paddingBottom="@dimen/standard_double_margin">

        <ImageView
            android:id="@+id/empty_list_icon"
            android:layout_width="@dimen/empty_list_icon_layout_width"
            android:layout_height="@dimen/empty_list_icon_layout_height"
            android:contentDescription="@string/file_list_folder"
            android:src="@drawable/file_image" />

        <TextView
            android:id="@+id/empty_list_view_headline"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="2"
            android:paddingTop="@dimen/standard_padding"
            android:paddingBottom="@dimen/standard_half_padding"
            android:text="@string/file_list_loading"
            android:textSize="26sp" />

        <TextView
            android:id="@+id/empty_list_view_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:ellipsize="end"
            android:gravity="center"
            android:paddingTop="@dimen/standard_half_padding"
            android:paddingBottom="@dimen/standard_half_padding"
            android:text="@string/file_list_empty"
            android:visibility="gone" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/empty_list_view_action"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/standard_half_margin"
            android:theme="@style/Button.Primary"
            android:visibility="gone"
            app:cornerRadius="@dimen/button_corner_radius" />
    </LinearLayout>

    <FrameLayout
        android:id="@+id/empty_list_progress"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.elyeproj.loaderviewlibrary.LoaderImageView
            android:id="@+id/shimmer"
            android:layout_width="96dp"
            android:layout_height="96dp"
            android:layout_gravity="center"
            android:contentDescription="@null"
            app:corners="24" />

        <ImageView
            android:id="@+id/shimmerThumbnail"
            android:layout_width="@dimen/empty_list_icon_layout_width"
            android:layout_height="@dimen/empty_list_icon_layout_height"
            android:layout_gravity="center"
            android:contentDescription="@null"
            android:src="@drawable/ic_image_outline" />

    </FrameLayout>
</FrameLayout>
