48 lines
1.9 KiB
XML
48 lines
1.9 KiB
XML
<?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"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
|
|
<!-- Video Thumbnail -->
|
|
<ImageView
|
|
android:id="@+id/videoThumbnail"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:scaleType="centerCrop"
|
|
app:layout_constraintDimensionRatio="16:9"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@id/videoTitle"
|
|
/>
|
|
|
|
<!-- Play Button (Centered on Thumbnail) -->
|
|
<ImageView
|
|
android:id="@+id/playButton"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:src="@android:drawable/ic_media_play"
|
|
app:layout_constraintBottom_toBottomOf="@id/videoThumbnail"
|
|
app:layout_constraintEnd_toEndOf="@id/videoThumbnail"
|
|
app:layout_constraintStart_toStartOf="@id/videoThumbnail"
|
|
app:layout_constraintTop_toTopOf="@id/videoThumbnail" />
|
|
|
|
<!-- Video Title -->
|
|
<TextView
|
|
android:id="@+id/videoTitle"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:padding="8dp"
|
|
android:text="..."
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:maxLines="2"
|
|
android:ellipsize="end"
|
|
app:layout_constraintTop_toBottomOf="@id/videoThumbnail"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:elevation="4dp"/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|