Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ object DownloadButtonSetup {
uri = Uri.EMPTY,
id = it.id,
parentId = it.parentId,
name = act.getString(R.string.downloaded_file),
name = it.name ?: act.getString(R.string.downloaded_file),
season = it.season,
episode = it.episode,
headerName = parent.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
}

val titleMove = if (isShowing) 0f else -50.toPx.toFloat()
playerBinding?.playerVideoTitle?.let {
playerBinding?.playerVideoTitleHolder?.let {
ObjectAnimator.ofFloat(it, "translationY", titleMove).apply {
duration = 200
start()
Expand Down Expand Up @@ -839,7 +839,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {

val fadeTo = if (isLocked) 0f else 1f
playerBinding?.apply {
val fadeAnimation = AlphaAnimation(playerVideoTitle.alpha, fadeTo).apply {
val fadeAnimation = AlphaAnimation(playerVideoTitleHolder.alpha, fadeTo).apply {
duration = 100
fillAfter = true
}
Expand All @@ -860,7 +860,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
//TITLE
playerVideoTitleRez.startAnimation(fadeAnimation)
playerEpisodeFiller.startAnimation(fadeAnimation)
playerVideoTitle.startAnimation(fadeAnimation)
playerVideoTitleHolder.startAnimation(fadeAnimation)
playerTopHolder.startAnimation(fadeAnimation)
// BOTTOM
playerLockHolder.startAnimation(fadeAnimation)
Expand Down Expand Up @@ -893,7 +893,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
val showPlayerEpisodes = !isGone && isThereEpisodes()
playerEpisodesButtonRoot.isVisible = showPlayerEpisodes
playerEpisodesButton.isVisible = showPlayerEpisodes
playerVideoTitle.isGone = togglePlayerTitleGone
playerVideoTitleHolder.isGone = togglePlayerTitleGone
// player_video_title_rez?.isGone = isGone
playerEpisodeFiller.isGone = isGone
playerCenterMenu.isGone = isGone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,7 @@ class GeneratorPlayer : FullScreenPlayer() {

playerBinding?.playerEpisodeFillerHolder?.isVisible = isFiller ?: false
playerBinding?.playerVideoTitle?.text = playerVideoTitle
playerBinding?.offlinePin?.isVisible = lastUsedGenerator is DownloadFileGenerator
}

@SuppressLint("SetTextI18n")
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_offline_pin_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:pathData="M320,680h320v-80L320,600v80ZM438,560 L664,334 607,279 438,448 352,362 296,418 438,560ZM480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q134,0 227,-93t93,-227q0,-134 -93,-227t-227,-93q-134,0 -227,93t-93,227q0,134 93,227t227,93ZM480,480Z"
android:fillColor="#e3e3e3"/>
</vector>
34 changes: 23 additions & 11 deletions app/src/main/res/layout/player_custom_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,31 @@
android:gravity="center"
android:textColor="@color/white"
tools:text="1920x1080" />

<TextView
android:maxLines="2"
android:id="@+id/player_video_title"
<LinearLayout
android:id="@+id/player_video_title_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:textStyle="bold"
android:visibility="visible"
tools:text="Hello world" />


android:gravity="center">
<TextView
android:maxLines="2"
android:id="@+id/player_video_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:textStyle="bold"
android:visibility="visible"
tools:text="Hello world " />
<ImageView
android:id="@+id/offline_pin"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="2dp"
android:src="@drawable/ic_offline_pin_24"
android:visibility="gone"
tools:visibility="visible"
android:layout_gravity="center"/>
</LinearLayout>
</LinearLayout>

<!-- Removed as it has no use anymore-->
Expand Down
39 changes: 26 additions & 13 deletions app/src/main/res/layout/player_custom_layout_tv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,21 +252,34 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="32dp"
android:orientation="vertical">

<TextView
android:maxLines="2"
android:id="@+id/player_video_title"
<LinearLayout
android:id="@+id/player_video_title_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="end"
android:maxWidth="600dp"
android:textAlignment="viewEnd"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
tools:text="Hello world" />

android:layout_gravity="end">
<TextView
android:maxLines="2"
android:id="@+id/player_video_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="end"
android:maxWidth="600dp"
android:textAlignment="viewEnd"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
tools:text="Hello world" />
<ImageView
android:id="@+id/offline_pin"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginStart="2dp"
android:src="@drawable/ic_offline_pin_24"
android:visibility="gone"
tools:visibility="visible"
android:layout_gravity="start"/>
</LinearLayout>
<TextView
android:id="@+id/player_video_title_rez"
android:layout_width="wrap_content"
Expand Down