<?xml version="1.0" encoding="utf-8"?>
<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/itemRoot"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
    android:padding="@dimen/video_item_search_padding">

    <ImageView
        android:id="@+id/itemThumbnailView"
        android:layout_width="98dp"
        android:layout_height="55dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="@dimen/video_item_search_image_right_margin"
        android:scaleType="centerCrop"
        android:src="@drawable/dummy_thumbnail"
        tools:ignore="RtlHardcoded" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemDurationView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@id/itemThumbnailView"
        android:layout_alignBottom="@id/itemThumbnailView"
        android:layout_marginRight="@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:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="@color/duration_text_color"
        android:textSize="@dimen/video_item_search_duration_text_size"
        tools:ignore="RtlHardcoded"
        tools:text="1:09:10" />

    <ImageView
        android:id="@+id/itemHandle"
        android:layout_width="wrap_content"
        android:layout_height="55dp"
        android:layout_alignParentRight="true"
        android:layout_gravity="center_vertical"
        android:contentDescription="@string/detail_drag_description"
        android:paddingLeft="@dimen/video_item_search_image_right_margin"
        android:scaleType="center"
        app:srcCompat="@drawable/ic_drag_handle"
        tools:ignore="RtlHardcoded,RtlSymmetry" />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemVideoTitleView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toStartOf="@id/itemHandle"
        android:layout_toLeftOf="@id/itemHandle"
        android:layout_toEndOf="@+id/itemThumbnailView"
        android:layout_toRightOf="@+id/itemThumbnailView"
        android:ellipsize="end"
        android:maxLines="2"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="@dimen/video_item_search_title_text_size"
        tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tristique..." />

    <org.schabi.newpipe.views.NewPipeTextView
        android:id="@+id/itemAdditionalDetails"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/itemVideoTitleView"
        android:layout_toStartOf="@id/itemHandle"
        android:layout_toLeftOf="@id/itemHandle"
        android:layout_toEndOf="@+id/itemThumbnailView"
        android:layout_toRightOf="@+id/itemThumbnailView"
        android:ellipsize="end"
        android:lines="1"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textSize="@dimen/video_item_search_uploader_text_size"
        tools:text="Uploader" />

    <org.schabi.newpipe.views.AnimatedProgressBar
        android:id="@+id/itemProgressView"
        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_width="wrap_content"
        android:layout_height="4dp"
        android:layout_below="@id/itemThumbnailView"
        android:layout_alignStart="@id/itemThumbnailView"
        android:layout_alignEnd="@id/itemThumbnailView"
        android:layout_marginTop="-2dp"
        android:progressDrawable="?progress_horizontal_drawable" />

</RelativeLayout>
