<?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/selector"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?attr/selectableItemBackground">

    <ImageView
        android:id="@+id/itemThumbnailView"
        android:layout_width="@dimen/play_queue_thumbnail_width"
        android:layout_height="@dimen/play_queue_thumbnail_height"
        android:layout_marginStart="@dimen/video_item_search_image_right_margin"
        android:layout_marginTop="@dimen/video_item_search_image_right_margin"
        android:layout_marginBottom="@dimen/video_item_search_image_right_margin"
        android:scaleType="fitCenter"
        android:src="@drawable/placeholder_thumbnail_video"
        app:layout_constraintBottom_toBottomOf="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_alignEnd="@id/itemThumbnailView"
        android:layout_alignBottom="@id/itemThumbnailView"
        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:paddingStart="@dimen/video_item_search_duration_horizontal_padding"
        android:paddingTop="@dimen/video_item_search_duration_vertical_padding"
        android:paddingEnd="@dimen/video_item_search_duration_horizontal_padding"
        android:paddingBottom="@dimen/video_item_search_duration_vertical_padding"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="@color/duration_text_color"
        android:textSize="@dimen/video_item_search_duration_text_size"
        android:contentDescription="@string/duration"
        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_alignParentTop="true"
        android:layout_marginStart="8dp"
        android:layout_toStartOf="@id/itemHandle"
        android:layout_toEndOf="@id/itemThumbnailView"
        android:ellipsize="end"
        android:singleLine="true"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="@dimen/video_item_search_title_text_size"
        app:layout_constraintBottom_toTopOf="@+id/itemAdditionalDetails"
        app:layout_constraintEnd_toStartOf="@+id/itemHandle"
        app:layout_constraintStart_toEndOf="@+id/itemThumbnailView"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_chainStyle="packed"
        tools:text="Lorem ipsum dolor sit amet, consectetur adipisci elit. " />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemAdditionalDetails"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="8dp"
        android:layout_toStartOf="@id/itemHandle"
        android:layout_toEndOf="@id/itemThumbnailView"
        android:ellipsize="end"
        android:singleLine="true"
        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"
        app:layout_constraintStart_toEndOf="@+id/itemThumbnailView"
        app:layout_constraintTop_toBottomOf="@+id/itemVideoTitleView"
        tools:text="Uploader uploader uploader uploader uploader · Youtube" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/itemHandle"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_alignParentRight="true"
        android:layout_gravity="center_vertical"
        android:paddingHorizontal="@dimen/video_item_search_image_right_margin"
        android:scaleType="center"
        android:src="@drawable/ic_drag_handle"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:ignore="ContentDescription,RtlHardcoded" />

</androidx.constraintlayout.widget.ConstraintLayout>
