80 lines
No EOL
3.3 KiB
XML
80 lines
No EOL
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout 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">
|
|
|
|
<data>
|
|
|
|
<import type="android.view.View" />
|
|
|
|
<variable
|
|
name="item"
|
|
type="org.jellyfin.sdk.model.api.BaseItemDto" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/item_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="12dp"
|
|
android:layout_marginBottom="24dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:foreground="@drawable/ripple_background"
|
|
android:orientation="vertical">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/item_image"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:scaleType="centerCrop"
|
|
app:itemImage="@{item}"
|
|
app:layout_constraintDimensionRatio="H,2:3"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Findroid.Image" />
|
|
|
|
<TextView
|
|
android:id="@+id/item_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="2"
|
|
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/item_image"
|
|
tools:text="Movie title" />
|
|
|
|
<TextView
|
|
android:id="@+id/item_count"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:background="@drawable/circle_background"
|
|
android:gravity="center"
|
|
android:text="@{item.userData.unplayedItemCount.toString()}"
|
|
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
|
android:textColor="?attr/colorOnPrimary"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="9" />
|
|
|
|
<ImageView
|
|
android:id="@+id/played_icon"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:background="@drawable/circle_background"
|
|
android:contentDescription="@string/episode_watched_indicator"
|
|
android:padding="4dp"
|
|
android:src="@drawable/ic_check"
|
|
android:visibility="@{item.userData.played == true ? View.VISIBLE : View.GONE}"
|
|
app:layout_constraintEnd_toEndOf="@id/item_image"
|
|
app:layout_constraintTop_toTopOf="@id/item_image"
|
|
app:tint="?attr/colorOnPrimary" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</layout> |