<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ListItemLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="@dimen/standard_list_item_size"
    android:background="?android:attr/selectableItemBackground"
    android:descendantFocusability="blocksDescendants"
    android:orientation="horizontal">

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

        <ImageView
            android:id="@+id/thumbnail"
            android:layout_width="@dimen/file_icon_size"
            android:layout_height="@dimen/file_icon_size"
            android:layout_marginLeft="@dimen/standard_margin"
            android:layout_marginRight="@dimen/standard_margin"
            android:contentDescription="@null"
            android:src="@drawable/folder"/>

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

            <TextView
                android:id="@+id/Filename"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="middle"
                android:singleLine="true"
                android:textColor="@color/text_color"
                android:textSize="@dimen/two_line_primary_text_size"
                tools:text="@string/placeholder_filename" />

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

                <TextView
                    android:id="@+id/fileSize"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    tools:text="@string/placeholder_fileSize"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"/>

                <TextView
                    android:id="@+id/file_separator"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingEnd="@dimen/standard_quarter_padding"
                    android:paddingStart="@dimen/zero"
                    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/deletionTimestamp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    tools:text="@string/placeholder_media_time"
                    android:textColor="@color/list_item_lastmod_and_filesize_text"
                    android:textSize="@dimen/two_line_secondary_text_size"/>

            </LinearLayout>

            <TextView
                android:id="@+id/originalLocation"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:text="@string/placeholder_filename"
                android:textColor="@color/list_item_lastmod_and_filesize_text"
                android:textSize="@dimen/two_line_secondary_text_size"/>

        </LinearLayout>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingEnd="@dimen/zero"
            android:paddingStart="@dimen/standard_half_padding">

            <ImageView
                android:id="@+id/restore"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:clickable="false"
                android:contentDescription="@string/restore_button_description"
                android:focusable="false"
                android:paddingEnd="@dimen/list_item_share_right_margin"
                android:paddingStart="@dimen/standard_half_padding"
                android:src="@drawable/ic_history"/>

            <ImageView
                android:id="@+id/customCheckbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@id/restore"
                android:clickable="false"
                android:contentDescription="@string/checkbox"
                android:focusable="false"
                android:paddingEnd="@dimen/alternate_padding"
                android:paddingStart="@dimen/standard_half_padding"
                android:src="@drawable/ic_checkbox_blank_outline"/>

            <ImageView
                android:id="@+id/overflowMenu"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@id/customCheckbox"
                android:clickable="true"
                android:contentDescription="@string/overflow_menu"
                android:focusable="true"
                android:paddingEnd="@dimen/alternate_padding"
                android:paddingStart="@dimen/standard_half_padding"
                android:src="@drawable/ic_dots_vertical"/>

        </RelativeLayout>

    </LinearLayout>

</LinearLayout>
