232 lines
10 KiB
XML
232 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- The closing credits, moved aside.
|
||
|
||
From the `CreditsStart` marker Emby writes into the chapter list, the picture is scaled
|
||
into the left half of the screen and run at double speed while this panel says what is
|
||
on next. The transform is the *activity's* — the same scale-and-translate the next-up
|
||
banner has always used on the PlayerView, deliberately not the pre-roll's reparenting,
|
||
because moving a SurfaceView between parents mid-playback tears the surface down and
|
||
flashes black. The pre-roll can afford that; a running credit roll cannot.
|
||
|
||
So the left half of this layout is empty on purpose: it is a hole for the picture that
|
||
is already there to show through.
|
||
|
||
Three things sit on it, and the arrangement is the design: what is *ending* in the top
|
||
left, how long until it hands over in the top right, and what is *next* in the panel
|
||
down the right-hand side. The two corners are deliberately opposite each other — they
|
||
are the two facts a viewer wants at a glance, and putting either inside the panel buries
|
||
it in prose the eye has already finished reading.
|
||
|
||
Nothing here says how fast the picture is running. A chip stating "2× speed" was the
|
||
only thing on screen that ever mentioned it, and it explained a mechanism rather than
|
||
answering a question: the countdown opposite already says the thing a viewer actually
|
||
wants to know, and it stays true whatever speed the stream turned out to sustain.
|
||
|
||
There is no scrim and no card behind the picture. It sits on somebody's film, and the
|
||
only lit surface is the button under focus. -->
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
xmlns:tools="http://schemas.android.com/tools"
|
||
android:id="@+id/player_end_credits"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:focusable="false"
|
||
android:visibility="gone">
|
||
|
||
<!-- What is playing, top left, above the shrunken picture.
|
||
|
||
The logo rather than the title because it is the show's own treatment and the one
|
||
thing on this screen that is unmistakably *this* programme — the panel opposite is
|
||
entirely about the next episode, so without this the screen says what is coming and
|
||
never what is ending. The start margin is the shrunken picture's own left edge,
|
||
which CREDITS_VIDEO_SCALE and CREDITS_VIDEO_SHIFT_X put at ~34dp on a 16:9 set, so
|
||
it reads as belonging to the picture beneath it.
|
||
|
||
The text fallback under it is not optional decoration: transparent Emby logos are
|
||
commonly black, and a black title treatment on this near-black screen is an
|
||
invisible heading — the same trap `ui/TitleLogo.kt` exists for. Exactly one of the
|
||
two is ever shown. -->
|
||
<ImageView
|
||
android:id="@+id/player_end_credits_logo"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="46dp"
|
||
android:layout_gravity="top|start"
|
||
android:layout_marginStart="34dp"
|
||
android:layout_marginTop="42dp"
|
||
android:adjustViewBounds="true"
|
||
android:contentDescription="@null"
|
||
android:maxWidth="260dp"
|
||
android:scaleType="fitStart"
|
||
android:visibility="gone"
|
||
tools:ignore="ContentDescription"
|
||
tools:visibility="visible" />
|
||
|
||
<TextView
|
||
android:id="@+id/player_end_credits_logo_text"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_gravity="top|start"
|
||
android:layout_marginStart="34dp"
|
||
android:layout_marginTop="42dp"
|
||
android:ellipsize="end"
|
||
android:maxLines="1"
|
||
android:maxWidth="260dp"
|
||
android:textColor="#E6FFFFFF"
|
||
android:textSize="21sp"
|
||
android:textStyle="bold"
|
||
android:visibility="gone"
|
||
tools:text="Love Story"
|
||
tools:visibility="visible" />
|
||
|
||
<!-- The countdown, top right, opposite the logo.
|
||
|
||
It is the one number on the screen that changes, and it answers the only question a
|
||
viewer has while the credits run: how long until the next episode takes over. Out
|
||
here rather than in the panel because the panel is a block of description that the
|
||
eye reads once, and a figure counting down inside it drags attention back to prose
|
||
somebody has already finished with.
|
||
|
||
Gone rather than blank until the last minute — the pane can open several minutes
|
||
before the file ends, and a countdown reading "4:12" would be the most prominent
|
||
thing on screen for most of its life. -->
|
||
<LinearLayout
|
||
android:id="@+id/player_end_credits_countdown_group"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_gravity="top|end"
|
||
android:layout_marginTop="42dp"
|
||
android:layout_marginEnd="72dp"
|
||
android:gravity="end"
|
||
android:orientation="vertical"
|
||
android:visibility="gone"
|
||
tools:visibility="visible">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:letterSpacing="0.14"
|
||
android:text="@string/end_credits_next_in_label"
|
||
android:textColor="#FF69CD61"
|
||
android:textSize="11sp" />
|
||
|
||
<TextView
|
||
android:id="@+id/player_end_credits_countdown"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="3dp"
|
||
android:textColor="#FFFFFFFF"
|
||
android:textSize="30sp"
|
||
android:textStyle="bold"
|
||
tools:text="0:28" />
|
||
</LinearLayout>
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:orientation="horizontal">
|
||
|
||
<!-- The hole the picture occupies. Weighted rather than fixed so the split is half
|
||
the screen on every set, whatever its width. -->
|
||
<Space
|
||
android:layout_width="0dp"
|
||
android:layout_height="match_parent"
|
||
android:layout_weight="1" />
|
||
|
||
<LinearLayout
|
||
android:id="@+id/player_end_credits_panel"
|
||
android:layout_width="0dp"
|
||
android:layout_height="match_parent"
|
||
android:layout_weight="1"
|
||
android:gravity="center_vertical"
|
||
android:orientation="vertical"
|
||
android:paddingStart="30dp"
|
||
android:paddingEnd="72dp">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:letterSpacing="0.14"
|
||
android:text="@string/next_up_label"
|
||
android:textColor="#FF69CD61"
|
||
android:textSize="11sp" />
|
||
|
||
<ImageView
|
||
android:id="@+id/player_end_credits_image"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="196dp"
|
||
android:layout_marginTop="14dp"
|
||
android:background="#FF1B2026"
|
||
android:contentDescription="@null"
|
||
android:scaleType="centerCrop" />
|
||
|
||
<TextView
|
||
android:id="@+id/player_end_credits_title"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="16dp"
|
||
android:ellipsize="end"
|
||
android:maxLines="2"
|
||
android:textColor="#FFFFFFFF"
|
||
android:textSize="26sp"
|
||
android:textStyle="bold"
|
||
tools:text="The Crossing" />
|
||
|
||
<TextView
|
||
android:id="@+id/player_end_credits_meta"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="4dp"
|
||
android:ellipsize="end"
|
||
android:maxLines="1"
|
||
android:textColor="#BFFFFFFF"
|
||
android:textSize="13sp"
|
||
tools:text="S02E05 · Northbound" />
|
||
|
||
<LinearLayout
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="18dp"
|
||
android:orientation="horizontal"
|
||
tools:ignore="ButtonStyle">
|
||
|
||
<Button
|
||
android:id="@+id/player_end_credits_play"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:background="@drawable/next_up_primary_button"
|
||
android:focusable="true"
|
||
android:minWidth="0dp"
|
||
android:paddingStart="22dp"
|
||
android:paddingTop="9dp"
|
||
android:paddingEnd="22dp"
|
||
android:paddingBottom="9dp"
|
||
android:stateListAnimator="@null"
|
||
android:text="@string/next_up_play_now"
|
||
android:textAllCaps="false"
|
||
android:textColor="@color/next_up_button_text"
|
||
android:textSize="15sp" />
|
||
|
||
<!-- Restores the picture and normal speed. Worded as watching the credits
|
||
rather than as dismissing a panel: somebody who presses this wants the
|
||
credits, and it is the only way back to them. -->
|
||
<Button
|
||
android:id="@+id/player_end_credits_dismiss"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginStart="10dp"
|
||
android:background="@drawable/next_up_secondary_button"
|
||
android:focusable="true"
|
||
android:minWidth="0dp"
|
||
android:paddingStart="22dp"
|
||
android:paddingTop="9dp"
|
||
android:paddingEnd="22dp"
|
||
android:paddingBottom="9dp"
|
||
android:stateListAnimator="@null"
|
||
android:text="@string/end_credits_watch"
|
||
android:textAllCaps="false"
|
||
android:textColor="@color/next_up_button_text"
|
||
android:textSize="15sp" />
|
||
</LinearLayout>
|
||
</LinearLayout>
|
||
</LinearLayout>
|
||
</FrameLayout>
|