trailer fixes + fullscreen

This commit is contained in:
LagradOst 2022-06-16 19:47:48 +02:00
parent 91a14dac0f
commit 62f1014e72
16 changed files with 281 additions and 108 deletions

View file

@ -33,7 +33,6 @@ object CommonActivity {
var canShowPipMode: Boolean = false var canShowPipMode: Boolean = false
var isInPIPMode: Boolean = false var isInPIPMode: Boolean = false
val backEvent = Event<Boolean>()
val onColorSelectedEvent = Event<Pair<Int, Int>>() val onColorSelectedEvent = Event<Pair<Int, Int>>()
val onDialogDismissedEvent = Event<Int>() val onDialogDismissedEvent = Event<Int>()

View file

@ -28,7 +28,6 @@ import com.lagradost.cloudstream3.APIHolder.allProviders
import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.APIHolder.apis
import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings
import com.lagradost.cloudstream3.APIHolder.initAll import com.lagradost.cloudstream3.APIHolder.initAll
import com.lagradost.cloudstream3.CommonActivity.backEvent
import com.lagradost.cloudstream3.CommonActivity.loadThemes import com.lagradost.cloudstream3.CommonActivity.loadThemes
import com.lagradost.cloudstream3.CommonActivity.onColorSelectedEvent import com.lagradost.cloudstream3.CommonActivity.onColorSelectedEvent
import com.lagradost.cloudstream3.CommonActivity.onDialogDismissedEvent import com.lagradost.cloudstream3.CommonActivity.onDialogDismissedEvent
@ -60,6 +59,7 @@ import com.lagradost.cloudstream3.utils.DataStore.removeKey
import com.lagradost.cloudstream3.utils.DataStore.setKey import com.lagradost.cloudstream3.utils.DataStore.setKey
import com.lagradost.cloudstream3.utils.DataStoreHelper.migrateResumeWatching import com.lagradost.cloudstream3.utils.DataStoreHelper.migrateResumeWatching
import com.lagradost.cloudstream3.utils.DataStoreHelper.setViewPos import com.lagradost.cloudstream3.utils.DataStoreHelper.setViewPos
import com.lagradost.cloudstream3.utils.IOnBackPressed
import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate
import com.lagradost.cloudstream3.utils.UIHelper.changeStatusBarState import com.lagradost.cloudstream3.utils.UIHelper.changeStatusBarState
import com.lagradost.cloudstream3.utils.UIHelper.checkWrite import com.lagradost.cloudstream3.utils.UIHelper.checkWrite
@ -235,15 +235,23 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
onUserLeaveHint(this) onUserLeaveHint(this)
} }
override fun onBackPressed() { private fun backPressed() {
this.window?.navigationBarColor = this.window?.navigationBarColor =
this.colorFromAttribute(R.attr.primaryGrayBackground) this.colorFromAttribute(R.attr.primaryGrayBackground)
this.updateLocale() this.updateLocale()
backEvent.invoke(true)
super.onBackPressed() super.onBackPressed()
this.updateLocale() this.updateLocale()
} }
override fun onBackPressed() {
((supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as? NavHostFragment?)?.childFragmentManager?.primaryNavigationFragment as? IOnBackPressed)?.onBackPressed()
?.let { runNormal ->
if (runNormal) backPressed()
} ?: run {
backPressed()
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (VLC_REQUEST_CODE == requestCode) { if (VLC_REQUEST_CODE == requestCode) {
if (resultCode == RESULT_OK && data != null) { if (resultCode == RESULT_OK && data != null) {
@ -363,7 +371,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
runBlocking { runBlocking {
val query = """ val query = """
query { query {
searchShows(search: "spider", limit: 10) { searchShows(search: "spider", limit: 10) {
id id
name name

View file

@ -62,7 +62,14 @@ import kotlinx.android.synthetic.main.player_custom_layout.player_ffwd_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_holder import kotlinx.android.synthetic.main.player_custom_layout.player_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_pause_play import kotlinx.android.synthetic.main.player_custom_layout.player_pause_play
import kotlinx.android.synthetic.main.player_custom_layout.player_pause_play_holder import kotlinx.android.synthetic.main.player_custom_layout.player_pause_play_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_left
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_left_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_left_icon
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_right
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_right_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_progressbar_right_icon
import kotlinx.android.synthetic.main.player_custom_layout.player_rew_holder import kotlinx.android.synthetic.main.player_custom_layout.player_rew_holder
import kotlinx.android.synthetic.main.player_custom_layout.player_time_text
import kotlinx.android.synthetic.main.player_custom_layout.player_video_bar import kotlinx.android.synthetic.main.player_custom_layout.player_video_bar
import kotlinx.android.synthetic.main.player_custom_layout.shadow_overlay import kotlinx.android.synthetic.main.player_custom_layout.shadow_overlay
import kotlinx.android.synthetic.main.trailer_custom_layout.* import kotlinx.android.synthetic.main.trailer_custom_layout.*
@ -226,7 +233,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
player_ffwd_holder?.alpha = 1f player_ffwd_holder?.alpha = 1f
player_rew_holder?.alpha = 1f player_rew_holder?.alpha = 1f
// player_pause_play_holder?.alpha = 1f // player_pause_play_holder?.alpha = 1f
shadow_overlay?.isVisible = true
shadow_overlay?.startAnimation(fadeAnimation) shadow_overlay?.startAnimation(fadeAnimation)
player_ffwd_holder?.startAnimation(fadeAnimation) player_ffwd_holder?.startAnimation(fadeAnimation)
player_rew_holder?.startAnimation(fadeAnimation) player_rew_holder?.startAnimation(fadeAnimation)
@ -251,7 +258,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
player_subtitle_offset_btt?.isGone = player.getCurrentPreferredSubtitle() == null player_subtitle_offset_btt?.isGone = player.getCurrentPreferredSubtitle() == null
} }
override fun onResume() { protected fun enterFullscreen() {
if (isFullScreenPlayer) { if (isFullScreenPlayer) {
activity?.hideSystemUI() activity?.hideSystemUI()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && fullscreenNotch) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && fullscreenNotch) {
@ -262,15 +269,12 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
} }
if (lockRotation) if (lockRotation)
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
super.onResume()
} }
override fun onDestroy() { protected fun exitFullscreen() {
activity?.showSystemUI() activity?.showSystemUI()
if (lockRotation) //if (lockRotation)
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
// simply resets brightness and notch settings that might have been overridden // simply resets brightness and notch settings that might have been overridden
val lp = activity?.window?.attributes val lp = activity?.window?.attributes
@ -280,6 +284,15 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT
} }
activity?.window?.attributes = lp activity?.window?.attributes = lp
}
override fun onResume() {
enterFullscreen()
super.onResume()
}
override fun onDestroy() {
exitFullscreen()
super.onDestroy() super.onDestroy()
} }
@ -529,6 +542,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
player_lock_holder?.startAnimation(fadeAnimation) player_lock_holder?.startAnimation(fadeAnimation)
//player_go_back_holder?.startAnimation(fadeAnimation) //player_go_back_holder?.startAnimation(fadeAnimation)
shadow_overlay?.isVisible = true
shadow_overlay?.startAnimation(fadeAnimation) shadow_overlay?.startAnimation(fadeAnimation)
updateLockUI() updateLockUI()
@ -774,14 +788,14 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
if (currentClickCount >= 1) { // have double clicked if (currentClickCount >= 1) { // have double clicked
currentDoubleTapIndex++ currentDoubleTapIndex++
if (doubleTapPauseEnabled) { // you can pause if your tap is in the middle of the screen if (doubleTapPauseEnabled && isFullScreenPlayer) { // you can pause if your tap is in the middle of the screen
when { when {
currentTouch.x < screenWidth / 2 - (DOUBLE_TAB_PAUSE_PERCENTAGE * screenWidth) -> { currentTouch.x < screenWidth / 2 - (DOUBLE_TAB_PAUSE_PERCENTAGE * screenWidth) -> {
if (doubleTapEnabled && isFullScreenPlayer) if (doubleTapEnabled)
rewind() rewind()
} }
currentTouch.x > screenWidth / 2 + (DOUBLE_TAB_PAUSE_PERCENTAGE * screenWidth) -> { currentTouch.x > screenWidth / 2 + (DOUBLE_TAB_PAUSE_PERCENTAGE * screenWidth) -> {
if (doubleTapEnabled && isFullScreenPlayer) if (doubleTapEnabled)
fastForward() fastForward()
} }
else -> { else -> {
@ -1050,6 +1064,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
// if nothing has loaded these buttons should not be visible // if nothing has loaded these buttons should not be visible
player_skip_episode?.isVisible = false player_skip_episode?.isVisible = false
player_skip_op?.isVisible = false player_skip_op?.isVisible = false
shadow_overlay?.isVisible = false
updateLockUI() updateLockUI()
updateUIVisibility() updateUIVisibility()

View file

@ -641,9 +641,15 @@ class ResultFragment : ResultTrailerPlayer() {
} }
private fun setTrailers(trailers: List<String>?) { private fun setTrailers(trailers: List<String>?) {
if(context?.isTvSettings() == true) return context?.let { ctx ->
currentTrailers = trailers ?: emptyList() if (ctx.isTvSettings()) return
loadTrailer() val settingsManager = PreferenceManager.getDefaultSharedPreferences(ctx)
val showTrailers =
settingsManager.getBoolean(ctx.getString(R.string.show_trailers_key), true)
if (!showTrailers) return
currentTrailers = trailers ?: emptyList()
loadTrailer()
}
} }
private fun setActors(actors: List<ActorData>?) { private fun setActors(actors: List<ActorData>?) {

View file

@ -2,14 +2,22 @@ package com.lagradost.cloudstream3.ui.result
import android.content.res.Configuration import android.content.res.Configuration
import android.graphics.Rect import android.graphics.Rect
import android.widget.LinearLayout import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.discord.panels.PanelsChildGestureRegionObserver import com.discord.panels.PanelsChildGestureRegionObserver
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.ui.player.SubtitleData import com.lagradost.cloudstream3.ui.player.SubtitleData
import com.lagradost.cloudstream3.utils.IOnBackPressed
import kotlinx.android.synthetic.main.fragment_result.*
import kotlinx.android.synthetic.main.fragment_result_swipe.*
import kotlinx.android.synthetic.main.fragment_trailer.* import kotlinx.android.synthetic.main.fragment_trailer.*
import kotlinx.android.synthetic.main.trailer_custom_layout.*
open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreenPlayer(), open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreenPlayer(),
PanelsChildGestureRegionObserver.GestureRegionsListener { PanelsChildGestureRegionObserver.GestureRegionsListener, IOnBackPressed {
override var lockRotation = false override var lockRotation = false
override var isFullScreenPlayer = false override var isFullScreenPlayer = false
@ -37,7 +45,7 @@ open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreen
private fun fixPlayerSize() { private fun fixPlayerSize() {
playerWidthHeight?.let { (w, h) -> playerWidthHeight?.let { (w, h) ->
val orientation = this.resources.configuration?.orientation ?: return val orientation = context?.resources?.configuration?.orientation ?: return
val sw = if (orientation == Configuration.ORIENTATION_LANDSCAPE) { val sw = if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
screenWidth screenWidth
@ -48,7 +56,10 @@ open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreen
player_background?.apply { player_background?.apply {
isVisible = true isVisible = true
layoutParams = layoutParams =
LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, sw * h / w) FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
if (isFullScreenPlayer) FrameLayout.LayoutParams.MATCH_PARENT else sw * h / w
)
} }
} }
} }
@ -65,4 +76,49 @@ open class ResultTrailerPlayer : com.lagradost.cloudstream3.ui.player.FullScreen
override fun exitedPipMode() {} override fun exitedPipMode() {}
override fun onGestureRegionsUpdate(gestureRegions: List<Rect>) {} override fun onGestureRegionsUpdate(gestureRegions: List<Rect>) {}
private fun updateFullscreen(fullscreen: Boolean) {
isFullScreenPlayer = fullscreen
lockRotation = fullscreen
player_fullscreen?.setImageResource(if (fullscreen) R.drawable.baseline_fullscreen_exit_24 else R.drawable.baseline_fullscreen_24)
uiReset()
if (fullscreen) {
enterFullscreen()
result_top_bar?.isVisible = false
result_fullscreen_holder?.isVisible = true
result_main_holder?.isVisible = false
player_background?.let { view ->
(view.parent as ViewGroup?)?.removeView(view)
result_fullscreen_holder?.addView(view)
}
} else {
result_top_bar?.isVisible = true
result_fullscreen_holder?.isVisible = false
result_main_holder?.isVisible = true
player_background?.let { view ->
(view.parent as ViewGroup?)?.removeView(view)
result_smallscreen_holder?.addView(view)
}
exitFullscreen()
}
fixPlayerSize()
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
player_fullscreen?.setOnClickListener {
updateFullscreen(!isFullScreenPlayer)
}
updateFullscreen(isFullScreenPlayer)
uiReset()
}
override fun onBackPressed(): Boolean {
return if (isFullScreenPlayer) {
updateFullscreen(false)
false
} else {
true
}
}
} }

View file

@ -0,0 +1,5 @@
package com.lagradost.cloudstream3.utils
interface IOnBackPressed {
fun onBackPressed(): Boolean
}

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5,16h3v3h2v-5L5,14v2zM8,8L5,8v2h5L10,5L8,5v3zM14,19h2v-3h3v-2h-5v5zM16,8L16,5h-2v5h5L19,8h-3z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/white">
<path
android:fillColor="@android:color/white"
android:pathData="M18,3v2h-2L16,3L8,3v2L6,5L6,3L4,3v18h2v-2h2v2h8v-2h2v2h2L20,3h-2zM8,17L6,17v-2h2v2zM8,13L6,13v-2h2v2zM8,9L6,9L6,7h2v2zM18,17h-2v-2h2v2zM18,13h-2v-2h2v2zM18,9h-2L16,7h2v2z"/>
</vector>

View file

@ -138,7 +138,13 @@
android:background="?attr/primaryBlackBackground" android:background="?attr/primaryBlackBackground"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/fragment_trailer" /> <FrameLayout
android:id="@+id/result_smallscreen_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<include layout="@layout/fragment_trailer" />
</FrameLayout>
<!-- <!--
<FrameLayout <FrameLayout

View file

@ -144,6 +144,15 @@
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:visibility="gone"
android:id="@+id/result_fullscreen_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<FrameLayout
android:id="@+id/result_main_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">

View file

@ -61,20 +61,6 @@
app:layout_constraintBottom_toTopOf="@+id/player_center_menu" app:layout_constraintBottom_toTopOf="@+id/player_center_menu"
app:layout_constraintTop_toBottomOf="@+id/topMenuRight"> app:layout_constraintTop_toBottomOf="@+id/topMenuRight">
<TextView
android:id="@+id/player_time_text_left"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="100dp"
android:alpha="0"
android:gravity="center|start"
android:shadowColor="@android:color/black"
android:shadowRadius="10.0"
android:textColor="@android:color/white"
android:textSize="40sp">
</TextView>
<TextView <TextView
android:id="@+id/player_time_text" android:id="@+id/player_time_text"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -84,20 +70,7 @@
android:shadowRadius="10.0" android:shadowRadius="10.0"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="30sp" android:textSize="30sp"
tools:text="+100"> tools:text="+100" />
</TextView>
<TextView
android:id="@+id/time_text_right"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="100dp"
android:gravity="center|end"
android:shadowColor="@android:color/black"
android:shadowRadius="10.0"
android:textColor="@android:color/white"
android:textSize="40sp" />
</RelativeLayout> </RelativeLayout>
<FrameLayout <FrameLayout
@ -522,7 +495,7 @@
android:nextFocusRight="@id/player_sources_btt" android:nextFocusRight="@id/player_sources_btt"
app:icon="@drawable/ic_outline_subtitles_24" app:icon="@drawable/ic_outline_subtitles_24"
android:text="@string/subtitle_offset"/> android:text="@string/subtitle_offset" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/player_sources_btt" android:id="@+id/player_sources_btt"
@ -592,15 +565,14 @@
style="@android:style/Widget.Material.ProgressBar.Horizontal" style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="4dp" android:layout_width="4dp"
android:layout_height="150dp" android:layout_height="150dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:indeterminate="false" android:indeterminate="false"
android:max="100" android:max="100"
android:progress="100" android:progress="100"
android:progressDrawable="@drawable/progress_drawable_vertical" android:progressDrawable="@drawable/progress_drawable_vertical"
tools:progress="30" /> tools:progress="30"
android:layout_centerInParent="true" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout

View file

@ -35,6 +35,17 @@
android:layout_height="60dp" /> android:layout_height="60dp" />
</FrameLayout> </FrameLayout>
<TextView
android:id="@+id/player_time_text"
android:layout_width="match_parent"
android:layout_height="200dp"
android:gravity="center"
android:shadowColor="@android:color/black"
android:shadowRadius="10.0"
android:textColor="@android:color/white"
android:textSize="30sp"
tools:text="+100" />
<FrameLayout <FrameLayout
android:id="@+id/subtitle_holder" android:id="@+id/subtitle_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -268,11 +279,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"> app:layout_constraintEnd_toEndOf="parent">
<LinearLayout <LinearLayout
android:layout_weight="1"
android:id="@+id/player_video_bar" android:id="@+id/player_video_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -325,6 +337,104 @@
</LinearLayout> </LinearLayout>
<ImageView
android:background="?android:attr/selectableItemBackgroundBorderless"
android:id="@+id/player_fullscreen"
app:tint="@color/white"
android:layout_gravity="center_vertical"
android:src="@drawable/baseline_fullscreen_24"
android:layout_marginEnd="10dp"
android:layout_width="24dp"
android:layout_height="24dp" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/player_progressbar_left_holder"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/centerMenuView"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:visibility="visible">
<!--VERY hacky layout -->
<ImageView
android:id="@+id/player_progressbar_left_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="220dp"
android:src="@drawable/ic_baseline_volume_up_24"
app:tint="@android:color/white"
tools:ignore="ContentDescription">
</ImageView>
<ProgressBar
android:id="@+id/player_progressbar_left"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="4dp"
android:layout_height="150dp"
android:layout_gravity="end|center_vertical"
android:layout_marginStart="40dp"
android:indeterminate="false"
android:max="100"
android:progress="100"
android:progressDrawable="@drawable/progress_drawable_vertical"
tools:progress="30"
android:layout_centerInParent="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/player_progressbar_right_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="right"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/centerMenuView"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:ignore="RtlHardcoded"
tools:visibility="visible">
<ImageView
android:id="@+id/player_progressbar_right_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="220dp"
android:src="@drawable/ic_baseline_brightness_7_24"
app:tint="@android:color/white"
tools:ignore="ContentDescription">
</ImageView>
<ProgressBar
android:id="@+id/player_progressbar_right"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="4dp"
android:layout_height="150dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="40dp"
android:indeterminate="false"
android:max="100"
android:progress="100"
android:progressDrawable="@drawable/progress_drawable_vertical" />
</RelativeLayout>
</LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -1,55 +1,5 @@
<!--https://newbedev.com/concatenate-multiple-strings-in-xml--> <!--https://newbedev.com/concatenate-multiple-strings-in-xml-->
<resources> <resources>
<!-- KEYS DON'T TRANSLATE -->
<string name="search_providers_list_key" translatable="false">search_providers_list</string>
<string name="locale_key" translatable="false">app_locale</string>
<string name="search_types_list_key" translatable="false">search_type_list</string>
<string name="auto_update_key" translatable="false">auto_update</string>
<string name="skip_update_key" translatable="false">skip_update_key</string>
<string name="prerelease_update_key" translatable="false">prerelease_update</string>
<string name="manual_check_update_key" translatable="false">manual_check_update</string>
<string name="fast_forward_button_time_key" translatable="false">fast_forward_button_time</string>
<string name="benene_count" translatable="false">benene_count</string>
<string name="subtitle_settings_key" translatable="false">subtitle_settings_key</string>
<string name="subtitle_settings_chromecast_key" translatable="false">subtitle_settings_chromecast_key</string>
<string name="quality_pref_key" translatable="false">quality_pref_key</string>
<string name="prefer_limit_title_key" translatable="false">prefer_limit_title_key</string>
<string name="prefer_limit_title_rez_key" translatable="false">prefer_limit_title_rez_key</string>
<string name="video_buffer_size_key" translatable="false">video_buffer_size_key</string>
<string name="video_buffer_length_key" translatable="false">video_buffer_length_key</string>
<string name="video_buffer_clear_key" translatable="false">video_buffer_clear_key</string>
<string name="video_buffer_disk_key" translatable="false">video_buffer_disk_key</string>
<string name="prerelease_commit_hash" translatable="false">unknown_prerelease</string>
<string name="use_system_brightness_key" translatable="false">use_system_brightness_key</string>
<string name="swipe_enabled_key" translatable="false">swipe_enabled_key</string>
<string name="playback_speed_enabled_key" translatable="false">playback_speed_enabled_key</string>
<string name="player_resize_enabled_key" translatable="false">player_resize_enabled_key</string>
<string name="pip_enabled_key" translatable="false">pip_enabled_key</string>
<string name="double_tap_enabled_key" translatable="false">double_tap_enabled_key</string>
<string name="double_tap_pause_enabled_key" translatable="false">double_tap_pause_enabled_key</string>
<string name="double_tap_seek_time_key" translatable="false">double_tap_seek_time_key</string>
<string name="swipe_vertical_enabled_key" translatable="false">swipe_vertical_enabled_key</string>
<string name="display_sub_key" translatable="false">display_sub_key</string>
<string name="show_fillers_key" translatable="false">show_fillers_key</string>
<string name="random_button_key" translatable="false">random_button_key</string>
<string name="provider_lang_key" translatable="false">provider_lang_key</string>
<string name="dns_key" translatable="false">dns_key</string>
<string name="download_path_key" translatable="false">download_path_key</string>
<string name="app_name_download_path" translatable="false">Cloudstream</string>
<string name="app_layout_key" translatable="false">app_layout_key</string>
<string name="primary_color_key" translatable="false">primary_color_key</string>
<string name="restore_key" translatable="false">restore_key</string>
<string name="killswitch_key" translatable="false">killswitch_key</string>
<string name="backup_key" translatable="false">backup_key</string>
<string name="prefer_media_type_key" translatable="false">prefer_media_type_key</string>
<string name="app_theme_key" translatable="false">app_theme_key</string>
<string name="episode_sync_enabled_key" translatable="false">episode_sync_enabled_key</string>
<string name="log_enabled_key" translatable="false">log_enabled_key</string>
<string name="show_logcat_key" translatable="false">show_logcat_key</string>
<string name="bottom_title_key" translatable="false">bottom_title_key</string>
<string name="poster_ui_key" translatable="false">poster_ui_key</string>
<string name="subtitles_encoding_key" translatable="false">subtitles_encoding_key</string>
<!-- FORMAT MIGHT TRANSLATE, WILL CAUSE CRASH IF APPLIED WRONG --> <!-- FORMAT MIGHT TRANSLATE, WILL CAUSE CRASH IF APPLIED WRONG -->
<string name="extra_info_format" translatable="false" formatted="true">%d %s | %sMB</string> <string name="extra_info_format" translatable="false" formatted="true">%d %s | %sMB</string>
<string name="storage_size_format" translatable="false" formatted="true">%s • %sGB</string> <string name="storage_size_format" translatable="false" formatted="true">%s • %sGB</string>

View file

@ -31,6 +31,7 @@
<string name="swipe_vertical_enabled_key" translatable="false">swipe_vertical_enabled_key</string> <string name="swipe_vertical_enabled_key" translatable="false">swipe_vertical_enabled_key</string>
<string name="display_sub_key" translatable="false">display_sub_key</string> <string name="display_sub_key" translatable="false">display_sub_key</string>
<string name="show_fillers_key" translatable="false">show_fillers_key</string> <string name="show_fillers_key" translatable="false">show_fillers_key</string>
<string name="show_trailers_key" translatable="false">show_trailers_key</string>
<string name="random_button_key" translatable="false">random_button_key</string> <string name="random_button_key" translatable="false">random_button_key</string>
<string name="provider_lang_key" translatable="false">provider_lang_key</string> <string name="provider_lang_key" translatable="false">provider_lang_key</string>
<string name="dns_key" translatable="false">dns_key</string> <string name="dns_key" translatable="false">dns_key</string>
@ -249,6 +250,7 @@
<string name="bug_report_settings_off">Only sends data on crashes</string> <string name="bug_report_settings_off">Only sends data on crashes</string>
<string name="bug_report_settings_on">Sends no data</string> <string name="bug_report_settings_on">Sends no data</string>
<string name="show_fillers_settings">Show filler episode for anime</string> <string name="show_fillers_settings">Show filler episode for anime</string>
<string name="show_trailers_settings">Show trailers</string>
<string name="updates_settings">Show app updates</string> <string name="updates_settings">Show app updates</string>
<string name="updates_settings_des">Automatically search for new updates on start</string> <string name="updates_settings_des">Automatically search for new updates on start</string>
<string name="uprereleases_settings">Update to prereleases</string> <string name="uprereleases_settings">Update to prereleases</string>

View file

@ -29,6 +29,11 @@
android:key="@string/bottom_title_key" android:key="@string/bottom_title_key"
android:summary="@string/bottom_title_settings_des" android:summary="@string/bottom_title_settings_des"
android:title="@string/bottom_title_settings" /> android:title="@string/bottom_title_settings" />
<SwitchPreference
android:key="@string/show_trailers_key"
android:icon="@drawable/baseline_theaters_24"
android:title="@string/show_trailers_settings"
android:defaultValue="true" />
<SwitchPreference <SwitchPreference
android:key="@string/show_fillers_key" android:key="@string/show_fillers_key"
android:icon="@drawable/ic_baseline_skip_next_24" android:icon="@drawable/ic_baseline_skip_next_24"