<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 Parneet Singh <gurayaparneet@gmail.com>
  ~ SPDX-FileCopyrightText: 2020 Andy Scherzinger <info@andy-scherzinger.de>
  ~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
<RelativeLayout 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:gravity="center"
    tools:context=".ui.preview.PreviewMediaActivity">

    <com.google.android.material.appbar.MaterialToolbar
        android:id="@+id/material_toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:elevation="@dimen/standard_quarter_margin"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true" />

    <ImageView
        android:id="@+id/image_preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:layout_margin="@dimen/standard_margin"
        android:contentDescription="@string/preview_image_description"
        android:src="@drawable/logo" />


    <androidx.media3.ui.PlayerView
        android:id="@+id/exoplayer_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        app:show_buffering="always" />

    <com.owncloud.android.media.MediaControlView
        android:id="@+id/media_controller"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_margin="@dimen/standard_margin"
        android:visibility="gone" />

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

        <com.elyeproj.loaderviewlibrary.LoaderImageView
            android:layout_width="@dimen/empty_list_icon_layout_width"
            android:layout_height="@dimen/empty_list_icon_layout_width"
            android:layout_gravity="center"
            android:contentDescription="@null"
            app:corners="24" />

        <ImageView
            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:padding="@dimen/standard_half_padding"
            android:src="@drawable/file_movie"
            app:tint="@color/bg_default" />
    </FrameLayout>

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

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

</RelativeLayout>
