mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 15:20:31 +05:30
118 lines
4.4 KiB
XML
118 lines
4.4 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"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
style="@style/ItemRow">
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
android:id="@+id/guideline"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
app:layout_constraintGuide_percent=".45" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/thumbnail_card"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintDimensionRatio="16:9"
|
|
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_bias="0.0"
|
|
app:strokeWidth="0dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/thumbnail"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:srcCompat="@tools:sample/backgrounds/scenic" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:orientation="vertical">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="end"
|
|
android:layout_marginEnd="5dp"
|
|
android:layout_marginBottom="5dp"
|
|
app:cardBackgroundColor="@color/duration_background_color"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="0dp">
|
|
|
|
<TextView
|
|
android:id="@+id/thumbnail_duration"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="6dp"
|
|
android:paddingVertical="2dp"
|
|
android:textColor="@color/duration_text_color"
|
|
android:textSize="11sp"
|
|
tools:text="05:36" />
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<View
|
|
android:id="@+id/watch_progress"
|
|
style="@style/WatchProgress" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<TextView
|
|
android:id="@+id/video_title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="2"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/thumbnail_card"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/video_info"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:maxLines="1"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/thumbnail_card"
|
|
app:layout_constraintTop_toBottomOf="@id/video_title" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/channel_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="8dp"
|
|
android:layout_marginTop="8dp"
|
|
android:orientation="horizontal"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/guideline"
|
|
app:layout_constraintTop_toBottomOf="@id/video_info">
|
|
|
|
<de.hdodenhof.circleimageview.CircleImageView
|
|
android:id="@+id/channel_image"
|
|
android:layout_width="27dp"
|
|
android:layout_height="27dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/channel_name"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginStart="8dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1" />
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |