<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Nextcloud - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2023 Alper Ozturk <alper_ozturk@proton.me>
  ~ SPDX-FileCopyrightText: 2018-2022 Tobias Kaminsky <tobias@kaminsky.me>
  ~ SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
  ~ SPDX-License-Identifier: AGPL-3.0-or-later
-->
<LinearLayout
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/ListItemLayout"
    android:orientation="vertical"
    android:layout_marginEnd="@dimen/grid_container_margin"
    android:layout_marginTop="@dimen/grid_container_margin"
    android:gravity="center"
    android:layout_width="match_parent"
    android:layout_height="@dimen/grid_container_height">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="@dimen/grid_container_width"
        android:layout_height="@dimen/grid_container_height">

        <com.elyeproj.loaderviewlibrary.LoaderImageView
            android:id="@+id/thumbnail_shimmer"
            android:visibility="gone"
            android:layout_marginBottom="@dimen/grid_thumbnail_margin_bottom"
            android:layout_width="@dimen/standard_list_item_size"
            android:layout_height="@dimen/standard_list_item_size"
            android:contentDescription="@null"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:visibility="visible" />

        <com.owncloud.android.ui.SquareImageView
            android:id="@+id/thumbnail"
            android:layout_marginBottom="@dimen/grid_thumbnail_margin_bottom"
            android:layout_width="@dimen/standard_list_item_size"
            android:layout_height="@dimen/standard_list_item_size"
            android:contentDescription="@null"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            android:scaleType="centerCrop"
            tools:visibility="visible"
            android:src="@drawable/file_image" />

        <LinearLayout
            android:id="@+id/file_features_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_marginEnd="@dimen/grid_layout_file_features_margin_end"
            android:layout_marginBottom="@dimen/grid_layout_margin_bottom"
            android:alpha="0.9"
            android:background="@drawable/rounded_rect"
            android:backgroundTint="@color/grid_file_features_background_color"
            android:orientation="horizontal"
            android:padding="@dimen/standard_quarter_padding"
            android:translationZ="4dp"
            app:layout_constraintBottom_toBottomOf="@+id/thumbnail"
            app:layout_constraintEnd_toEndOf="parent">

            <ImageView
                android:id="@+id/favorite_action"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:contentDescription="@string/favorite_icon"
                android:src="@drawable/favorite" />

            <ImageView
                android:id="@+id/videoOverlay"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:contentDescription="@string/video_overlay_icon"
                android:src="@drawable/video_white"
                android:visibility="gone"
                app:tint="@color/grid_file_features_icon_color"
                tools:visibility="visible" />

            <ImageView
                android:id="@+id/sharedIcon"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:contentDescription="@string/shared_icon_shared_via_link"
                android:src="@drawable/shared_via_link"
                app:tint="@color/grid_file_features_icon_color"
                tools:visibility="visible" />

            <ImageView
                android:id="@+id/unreadComments"
                tools:ignore="TouchTargetSizeCheck"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:clickable="true"
                android:contentDescription="@string/unread_comments"
                android:focusable="true"
                android:src="@drawable/ic_comment_grid"
                android:visibility="gone"
                app:tint="@color/grid_file_features_icon_color"
                tools:visibility="visible" />

            <ImageView
                android:id="@+id/grid_live_photo_indicator"
                tools:ignore="TouchTargetSizeCheck"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:clickable="true"
                android:contentDescription="@string/grid_file_features_live_photo_content_description"
                android:focusable="true"
                android:src="@drawable/ic_live_photo"
                android:visibility="gone"
                app:tint="@color/grid_file_features_icon_color"
                tools:visibility="visible" />

            <ImageView
                android:id="@+id/localFileIndicator"
                android:layout_width="@dimen/grid_layout_item_size"
                android:layout_height="@dimen/grid_layout_item_size"
                android:layout_marginEnd="@dimen/grid_layout_margin_end"
                android:contentDescription="@string/synced_icon"
                android:src="@drawable/ic_synced"
                tools:visibility="visible" />

        </LinearLayout>

        <ImageView
            android:id="@+id/custom_checkbox"
            android:layout_width="@dimen/grid_checkbox_size"
            android:layout_height="@dimen/grid_checkbox_size"
            android:layout_marginStart="@dimen/grid_checkbox_margin"
            android:layout_marginTop="@dimen/grid_checkbox_margin"
            android:contentDescription="@string/checkbox"
            android:src="@android:drawable/checkbox_off_background"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/Filename"
            android:layout_width="@dimen/grid_filename_width"
            android:layout_height="@dimen/grid_bottom_view_height"
            android:layout_gravity="center"
            android:layout_marginBottom="@dimen/grid_bottom_view_margin_bottom"
            android:ellipsize="middle"
            android:gravity="center"
            android:singleLine="true"
            android:text="@string/placeholder_filename"
            android:textColor="@color/text_color"
            android:textSize="@dimen/grid_item_text_size"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            tools:visibility="visible" />

        <ImageButton
            android:id="@+id/more"
            android:layout_width="@dimen/grid_bottom_view_height"
            android:layout_marginBottom="@dimen/grid_bottom_view_margin_bottom"
            tools:ignore="TouchTargetSizeCheck"
            android:layout_height="@dimen/grid_bottom_view_height"
            android:layout_marginEnd="@dimen/grid_bottom_view_margin_end"
            android:layout_gravity="center"
            android:background="@color/transparent"
            android:contentDescription="@string/overflow_menu"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:srcCompat="@drawable/ic_dots_vertical" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>
