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

  Copyright (C) 2012 Bartek Przybylski
  Copyright (C) 2017 ownCloud GmbH.
  Copyright (C) 2018 Andy Scherzinger

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2,
  as published by the Free Software Foundation.

  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/>.
-->
<ScrollView 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/scrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:paddingLeft="@dimen/standard_padding"
                android:paddingTop="@dimen/standard_padding"
                android:paddingRight="@dimen/standard_padding"
                android:paddingBottom="@dimen/standard_padding">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/filename"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="middle"
                        android:text="@string/placeholder_filename"
                        android:textColor="@color/text_color"
                        android:textSize="20sp"
                        android:textStyle="bold"
                        tools:text="@string/placeholder_filename"/>

                    <LinearLayout
                        android:id="@+id/filedetails"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:orientation="horizontal">

                        <ImageView
                            android:id="@+id/favorite"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/zero"
                            android:layout_marginLeft="@dimen/zero"
                            android:layout_marginEnd="@dimen/standard_eighth_margin"
                            android:layout_marginRight="@dimen/standard_eighth_margin"
                            android:contentDescription="@null"
                            android:src="@drawable/ic_star_outline" />

                        <TextView
                            android:id="@+id/size"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textSize="16sp"
                            tools:text="@string/placeholder_fileSize" />

                        <TextView
                            android:id="@+id/file_separator"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="end"
                            android:paddingStart="@dimen/zero"
                            android:paddingLeft="@dimen/zero"
                            android:paddingEnd="@dimen/standard_quarter_padding"
                            android:paddingRight="@dimen/standard_quarter_padding"
                            android:text="@string/info_separator"
                            android:textColor="@color/list_item_lastmod_and_filesize_text"
                            android:textSize="@dimen/two_line_secondary_text_size" />

                        <TextView
                            android:id="@+id/last_modification_timestamp"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:gravity="end"
                            android:textSize="16sp"
                            tools:text="@string/placeholder_media_time" />

                        <ImageView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/standard_margin"
                            android:layout_marginLeft="@dimen/standard_margin"
                            android:layout_marginEnd="@dimen/standard_eighth_margin"
                            android:layout_marginRight="@dimen/standard_eighth_margin"
                            android:contentDescription="@null"
                            android:src="@drawable/ic_tag"
                            android:visibility="gone" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/tags"
                            android:visibility="gone" />

                    </LinearLayout>

                </LinearLayout>

                <ImageView
                    android:id="@+id/overflow_menu"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@color/bg_default"
                    android:contentDescription="@string/overflow_menu"
                    android:src="@drawable/ic_dots_vertical" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/progressBlock"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingLeft="@dimen/standard_padding"
                android:paddingRight="@dimen/standard_padding"
                android:paddingBottom="@dimen/standard_half_padding">

                <TextView
                    android:id="@+id/progressText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/downloader_download_in_progress_ticker" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="@dimen/standard_quarter_margin"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <ProgressBar
                        android:id="@+id/progressBar"
                        style="?android:attr/progressBarStyleHorizontal"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:indeterminate="false"
                        android:indeterminateOnly="false" />

                    <ImageButton
                        android:id="@+id/cancelBtn"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/standard_half_margin"
                        android:layout_marginLeft="@dimen/standard_half_margin"
                        android:background="@android:color/transparent"
                        android:contentDescription="@string/common_cancel"
                        android:src="@drawable/ic_cancel" />

                </LinearLayout>

            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/list_divider_background" />

            <com.google.android.material.tabs.TabLayout
                android:id="@+id/tab_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/bg_default"
                app:tabGravity="center"
                app:tabMode="fixed"
                app:tabTextColor="@color/text_color"
                app:tabTextAppearance="@style/AppTabTextAppearance" />

            <androidx.viewpager.widget.ViewPager
                android:id="@+id/pager"
                android:layout_width="match_parent"
                android:layout_height="fill_parent" />
        </LinearLayout>

        <include layout="@layout/empty_list" />
    </LinearLayout>
</ScrollView>
