<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Nextcloud Talk - Android Client
  ~
  ~ SPDX-FileCopyrightText: 2022 Tim Krüger <t@timkrueger.me>
  ~ SPDX-License-Identifier: GPL-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/file_item"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="@dimen/standard_margin"
    android:layout_marginEnd="@dimen/standard_margin"
    android:layout_marginBottom="@dimen/standard_half_margin"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/preview_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="2dp"
        android:layout_marginEnd="@dimen/standard_margin"
        android:adjustViewBounds="true"
        app:layout_alignSelf="flex_start"
        app:layout_flexGrow="1"
        app:layout_wrapBefore="true">

        <ImageView
            android:id="@+id/file_image"
            android:layout_width="@dimen/mediatab_file_icon_size"
            android:layout_height="@dimen/mediatab_file_icon_size"
            android:padding="4dp"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@drawable/ic_call_black_24dp"
            tools:ignore="ContentDescription" />

        <ProgressBar
            android:id="@+id/progress_bar"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_gravity="center"
            android:visibility="gone" />
    </FrameLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_centerVertical="true"
        android:layout_toEndOf="@id/preview_container">

        <androidx.emoji2.widget.EmojiTextView
            android:id="@+id/file_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:lines="1"
            android:textAlignment="viewStart"
            android:textAppearance="@style/ListItem"
            android:textSize="@dimen/two_line_primary_text_size"
            tools:text="Filename.md" />

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

            <TextView
                android:id="@+id/file_size"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:text="11 KB" />

            <TextView
                android:id="@+id/separator_1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_quarter_margin"
                android:text="|"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:ignore="HardcodedText" />

            <TextView
                android:id="@+id/file_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_quarter_margin"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:text="04-05-2022 21:16" />

            <TextView
                android:id="@+id/separator_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_quarter_margin"
                android:text="|"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:ignore="HardcodedText" />

            <TextView
                android:id="@+id/actor"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/standard_quarter_margin"
                android:textColor="@color/textColorMaxContrast"
                android:textSize="14sp"
                tools:text="Actor" />

        </LinearLayout>
    </LinearLayout>
</RelativeLayout>












