120 lines
No EOL
5.4 KiB
XML
120 lines
No EOL
5.4 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" />
|
|
|
|
<import type="org.jellyfin.sdk.model.api.LocationType" />
|
|
|
|
<variable
|
|
name="episode"
|
|
type="org.jellyfin.sdk.model.api.BaseItemDto" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="100dp"
|
|
android:layout_marginHorizontal="24dp"
|
|
android:layout_marginBottom="24dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:foreground="@drawable/ripple_background">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/episode_image"
|
|
android:layout_width="100dp"
|
|
android:layout_height="100dp"
|
|
android:scaleType="centerCrop"
|
|
app:baseItemImage="@{episode}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Findroid.Image" />
|
|
|
|
<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="@{episode.userData.played == true ? View.VISIBLE : View.GONE}"
|
|
app:layout_constraintEnd_toEndOf="@id/episode_image"
|
|
app:layout_constraintTop_toTopOf="@id/episode_image"
|
|
app:tint="?attr/colorOnPrimary" />
|
|
|
|
<FrameLayout
|
|
android:id="@+id/missing_icon"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:background="@drawable/circle_background"
|
|
android:backgroundTint="?attr/colorError"
|
|
android:visibility="@{episode.locationType == LocationType.VIRTUAL ? View.VISIBLE : View.GONE}"
|
|
app:layout_constraintEnd_toStartOf="@id/played_icon"
|
|
app:layout_constraintTop_toTopOf="@id/episode_image">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:text="M"
|
|
android:textColor="@color/white"
|
|
tools:ignore="HardcodedText" />
|
|
</FrameLayout>
|
|
|
|
<FrameLayout
|
|
android:id="@+id/progress_bar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="4dp"
|
|
android:layout_marginHorizontal="8dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:background="@drawable/button_setup_background"
|
|
android:visibility="gone"
|
|
app:layout_constraintBottom_toBottomOf="@id/episode_image"
|
|
app:layout_constraintStart_toStartOf="@id/episode_image"
|
|
tools:layout_width="50dp"
|
|
tools:visibility="visible" />
|
|
|
|
<TextView
|
|
android:id="@+id/episode_title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="12dp"
|
|
android:text="@{String.format(@string/episode_name, episode.indexNumber, episode.name)}"
|
|
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
|
app:layout_constraintBottom_toTopOf="@id/episode_desc"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/episode_image"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="1. To You, in 2000 Years: The Fall of Shiganshina, Part 1" />
|
|
|
|
<TextView
|
|
android:id="@+id/episode_desc"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:scrollbars="none"
|
|
android:text="@{episode.overview}"
|
|
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@id/episode_title"
|
|
app:layout_constraintTop_toBottomOf="@id/episode_title"
|
|
tools:text="After one hundred years of peace, humanity is suddenly reminded of the terror of being at the Titans' mercy. After one hundred years of peace, humanity is suddenly reminded of the terror of being at the Titans' mercy." />
|
|
|
|
<FrameLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="24dp"
|
|
android:background="@drawable/header_gradient"
|
|
app:layout_constraintBottom_toBottomOf="@id/episode_desc"
|
|
app:layout_constraintEnd_toEndOf="@id/episode_desc"
|
|
app:layout_constraintStart_toStartOf="@id/episode_desc" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</layout> |