LibreTube/app/src/main/res/layout/playlist_row.xml

109 lines
4.4 KiB
XML
Raw Normal View History

2022-04-18 00:20:10 +05:30
<?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/video_search"
2022-04-18 00:20:10 +05:30
android:layout_width="match_parent"
android:layout_height="wrap_content"
2022-05-01 03:44:44 +05:30
android:layout_margin="8dp"
2022-04-18 00:20:10 +05:30
android:layout_marginBottom="16dp"
android:background="?android:attr/selectableItemBackground">
2022-04-18 00:20:10 +05:30
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
2022-06-03 22:19:48 +05:30
app:layout_constraintGuide_percent=".45" />
2022-04-18 00:20:10 +05:30
<com.google.android.material.card.MaterialCardView
android:id="@+id/card_search_thumbnail"
android:layout_width="0dp"
android:layout_height="0dp"
app:cardCornerRadius="8dp"
2022-04-18 00:20:10 +05:30
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="16:9"
app:layout_constraintEnd_toStartOf="@+id/guideline"
2022-04-18 00:20:10 +05:30
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">
2022-04-18 00:20:10 +05:30
<ImageView
android:id="@+id/playlist_thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:srcCompat="@tools:sample/backgrounds/scenic" />
2022-06-03 22:19:48 +05:30
2022-07-28 18:25:05 +05:30
<LinearLayout
android:layout_width="match_parent"
2022-04-18 00:20:10 +05:30
android:layout_height="wrap_content"
2022-07-28 18:25:05 +05:30
android:layout_gravity="bottom"
android:orientation="vertical">
2022-07-28 18:25:05 +05:30
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2022-07-28 18:25:05 +05:30
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"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="bottom"
android:background="@android:color/holo_red_dark" />
</LinearLayout>
2022-04-18 00:20:10 +05:30
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/playlist_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
app:layout_constraintEnd_toStartOf="@+id/delete_playlist"
app:layout_constraintStart_toEndOf="@+id/card_search_thumbnail"
2022-07-28 19:41:35 +05:30
app:layout_constraintTop_toTopOf="parent"
tools:text="Playlist Name" />
2022-04-18 00:20:10 +05:30
<TextView
android:id="@+id/playlist_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
app:layout_constraintEnd_toStartOf="@+id/delete_playlist"
app:layout_constraintStart_toEndOf="@+id/card_search_thumbnail"
2022-07-28 19:41:35 +05:30
app:layout_constraintTop_toBottomOf="@+id/playlist_title"
tools:text="Description" />
2022-06-03 22:19:48 +05:30
2022-04-18 00:20:10 +05:30
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/delete_playlist"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:padding="8dp"
2022-04-18 00:20:10 +05:30
android:src="@drawable/ic_delete"
android:visibility="gone"
2022-04-18 00:20:10 +05:30
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/roundedImageViewRounded" />
2022-04-18 00:20:10 +05:30
</androidx.constraintlayout.widget.ConstraintLayout>