* Add basic leanback support * Add TV home fragment Adds basic media browsing screen for TV. Shows Home screen media. * Fix double emit when loading user views * Fix bug when going back to this screen would duplicate menu items * Add basic media detail fragment * Add ability to navigate to detail fragment * Fix imports and null safe calls * Fix displaying of home item view type media files * Playback refactor * Add basic Tv player controls and split PlayerActivity * Update strings * Add progress bar to partially played items on TV home screen * Track selection dialog PoC * Update track selection WIP * Show track selection of focus change * Fix series display from home * Minor updates * Add back button to media detail * Zero effort add server and login * Fix colors * Fix back button from home going back to init fragment * Add settings button to home screen * Fix crash after goig back from media detail fragment * Show seasons and cast * Merge branch 'develop' into add_basic_tv_support # Conflicts: # app/src/main/java/dev/jdtech/jellyfin/MainActivity.kt # app/src/main/java/dev/jdtech/jellyfin/dialogs/VideoVersionDialogFragment.kt # app/src/main/res/navigation/app_navigation.xml * Fix cast title being shown with empty cast list * Remove useless method * Remove unused parameter * Fix crash due to colorOnPrimary not existing in Leanback styles * Remove unused theme * Fix home to addserver fragment navigation * Reuse home item layouts This creates some duplicate code which will probably be cleaned up later * Ignore more MissingDefaultResource * Add banner Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
136 lines
No EOL
5.5 KiB
XML
136 lines
No EOL
5.5 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"
|
|
android:id="@+id/tv_player_controls"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@color/player_background"
|
|
tools:ignore="MissingDefaultResource"
|
|
>
|
|
|
|
<ImageButton
|
|
android:id="@+id/back_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/player_controls_exit"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_arrow_left"
|
|
android:focusable="true"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/video_name"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="16dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
|
android:textColor="@color/white"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/back_button"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="The Dawn of Despair"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/btn_audio_track"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/select_audio_track"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_speaker"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toTopOf="@id/exo_progress"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/btn_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/tv_controls_margin_start"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/select_subtile_track"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_closed_caption"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toTopOf="@id/exo_progress"
|
|
app:layout_constraintStart_toEndOf="@id/btn_audio_track"
|
|
/>
|
|
|
|
<com.google.android.exoplayer2.ui.DefaultTimeBar
|
|
android:id="@+id/exo_progress"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintBottom_toTopOf="@id/exo_play_pause"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
android:focusable="true"
|
|
app:played_color="?colorPrimary"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/exo_rew"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/player_controls_rewind"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_rewind"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/exo_play_pause"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/tv_controls_margin_start"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/play_button_description"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_pause"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/exo_rew"
|
|
android:focusedByDefault="true"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/exo_ffwd"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/tv_controls_margin_start"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/player_controls_fast_forward"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_fast_forward"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/exo_play_pause"
|
|
/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/exo_next"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/tv_controls_margin_start"
|
|
android:background="@drawable/transparent_circle_background"
|
|
android:contentDescription="@string/player_controls_skip"
|
|
android:padding="@dimen/tv_controls_padding"
|
|
android:src="@drawable/ic_skip_forward"
|
|
android:focusable="true"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/exo_ffwd"
|
|
/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |