<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/itemRoot"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
   android:paddingTop="12dp"
   android:paddingBottom="8dp"
   android:paddingHorizontal="12dp"
>

    <org.schabi.newpipe.views.DynamicGridImageView
        android:id="@+id/itemThumbnailView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:scaleType="centerCrop"
        android:src="@drawable/dummy_thumbnail"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemDurationView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="@dimen/video_item_search_duration_margin"
        android:layout_marginBottom="@dimen/video_item_search_duration_margin"
        android:background="@color/duration_background_color"
        android:paddingLeft="@dimen/video_item_search_duration_horizontal_padding"
        android:paddingTop="@dimen/video_item_search_duration_vertical_padding"
        android:paddingRight="@dimen/video_item_search_duration_horizontal_padding"
        android:paddingBottom="@dimen/video_item_search_duration_vertical_padding"
        android:textAllCaps="true"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="@color/duration_text_color"
        android:textSize="@dimen/video_item_search_duration_text_size"
        app:layout_constraintBottom_toBottomOf="@+id/itemThumbnailView"
        app:layout_constraintEnd_toEndOf="@+id/itemThumbnailView"
        tools:text="1:09:10" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemVideoTitleView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:ellipsize="end"
        android:maxLines="2"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="@dimen/video_item_search_title_text_size"
        app:layout_constraintBottom_toTopOf="@+id/itemUploaderView"
        app:layout_constraintEnd_toEndOf="@+id/itemThumbnailView"
        app:layout_constraintStart_toStartOf="@+id/itemThumbnailView"
        app:layout_constraintTop_toBottomOf="@+id/itemThumbnailView"
        tools:text="@tools:sample/lorem[10]" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemUploaderView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:lines="1"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textSize="@dimen/video_item_search_uploader_text_size"
        app:layout_constraintBottom_toTopOf="@+id/itemAdditionalDetails"
        app:layout_constraintEnd_toEndOf="@+id/itemThumbnailView"
        app:layout_constraintStart_toStartOf="@+id/itemThumbnailView"
        app:layout_constraintTop_toBottomOf="@+id/itemVideoTitleView"
        tools:text="Uploader name long very very long long" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemAdditionalDetails"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:lines="1"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textSize="@dimen/video_item_search_upload_date_text_size"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/itemHandle"
        android:layout_marginEnd="4dp"

        app:layout_constraintStart_toStartOf="@+id/itemThumbnailView"
        app:layout_constraintTop_toBottomOf="@+id/itemUploaderView"
        tools:text="2 years ago • 10M views" />

    <org.schabi.newpipe.views.AnimatedProgressBar
        android:id="@+id/itemProgressView"
        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_width="0dp"
        android:layout_height="4dp"
        android:progressDrawable="@drawable/progress_youtube_horizontal_light_rounded"
        app:layout_constraintBottom_toBottomOf="@+id/itemThumbnailView"
        app:layout_constraintEnd_toEndOf="@+id/itemThumbnailView"
        app:layout_constraintStart_toStartOf="@+id/itemThumbnailView" />

    <ImageView
        android:id="@+id/itemHandle"
        android:layout_width="wrap_content"
        android:layout_height="32dp"
        android:contentDescription="@string/detail_drag_description"
        android:paddingStart="2dp"
        android:scaleType="center"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/itemAdditionalDetails"
        app:layout_constraintEnd_toEndOf="@id/itemThumbnailView"
        app:layout_constraintTop_toTopOf="@id/itemAdditionalDetails"
        app:srcCompat="@drawable/ic_drag_handle"
        tools:ignore="RtlHardcoded,RtlSymmetry" />

</androidx.constraintlayout.widget.ConstraintLayout>
