<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2020 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2020 Nextcloud GmbH
  ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
-->
<LinearLayout 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/unified_search_item_layout"
    android:layout_width="match_parent"
    android:layout_height="@dimen/standard_list_item_size"
    android:baselineAligned="false"
    android:paddingStart="0dp"
    android:paddingEnd="@dimen/standard_padding"
    android:orientation="horizontal">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="@dimen/standard_list_item_size"
        android:layout_height="@dimen/standard_list_item_size"
        android:layout_marginStart="@dimen/zero"
        android:layout_marginEnd="@dimen/standard_quarter_padding">

        <FrameLayout
            android:id="@+id/thumbnail_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

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

            <com.elyeproj.loaderviewlibrary.LoaderImageView
                android:id="@+id/thumbnail_shimmer"
                android:layout_width="@dimen/file_icon_size"
                android:layout_height="@dimen/file_icon_size"
                android:visibility="gone"
                app:corners="8" />
        </FrameLayout>

        <ImageView
            android:id="@+id/localFileIndicator"
            android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
            android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
            android:contentDescription="@string/downloader_download_succeeded_ticker"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_synced"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@+id/thumbnail_layout"
            app:layout_constraintEnd_toEndOf="@+id/thumbnail_layout"
            app:layout_constraintStart_toEndOf="@+id/thumbnail_layout"
            app:layout_constraintTop_toBottomOf="@+id/thumbnail_layout" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="top"
        android:orientation="vertical"
        android:paddingTop="@dimen/standard_padding">

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

        <TextView
            android:id="@+id/subline"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="middle"
            android:singleLine="true"
            android:text=""
            android:textColor="@color/list_item_lastmod_and_filesize_text"
            android:textSize="@dimen/two_line_secondary_text_size"
            tools:text="@string/placeholder_in_folder" />

    </LinearLayout>

    <ImageButton
        android:id="@+id/more"
        android:visibility="gone"
        android:background="@color/transparent"
        app:srcCompat="@drawable/ic_dots_vertical"
        app:tint="@color/standard_grey"
        android:layout_gravity="center"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:contentDescription="@string/overflow_menu"
        tools:visibility="visible" />

</LinearLayout>

