mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
resultpage UI update and readded trailers
This commit is contained in:
parent
f268418190
commit
28b4456dfd
14 changed files with 1009 additions and 914 deletions
|
@ -176,7 +176,9 @@ dependencies {
|
|||
implementation("com.jaredrummler:colorpicker:1.1.0")
|
||||
|
||||
//run JS
|
||||
implementation("org.mozilla:rhino:1.7.14")
|
||||
// do not upgrade to 1.7.14, since in 1.7.14 Rhino uses the `SourceVersion` class, which is not
|
||||
// available on Android (even when using desugaring), and `NoClassDefFoundError` is thrown
|
||||
implementation("org.mozilla:rhino:1.7.13")
|
||||
|
||||
// TorrentStream
|
||||
//implementation("com.github.TorrentStream:TorrentStream-Android:2.7.0")
|
||||
|
@ -211,9 +213,9 @@ dependencies {
|
|||
// slow af yt
|
||||
//implementation("com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT")
|
||||
|
||||
// newpipe yt
|
||||
implementation("com.github.TeamNewPipe:NewPipeExtractor:dev-SNAPSHOT")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
|
||||
// newpipe yt taken from https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle#L190
|
||||
implementation("com.github.TeamNewPipe:NewPipeExtractor:9ffdd0948b2ecd82655f5ff2a3e127b2b7695d5b")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.6")
|
||||
|
||||
// Library/extensions searching with Levenshtein distance
|
||||
implementation("me.xdrop:fuzzywuzzy:1.4.0")
|
||||
|
|
|
@ -46,6 +46,7 @@ open class YoutubeExtractor : ExtractorApi() {
|
|||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
println("TRYING TO ExTRACT: $url")
|
||||
if (ytVideos[url].isNullOrEmpty()) {
|
||||
val link =
|
||||
YoutubeStreamLinkHandlerFactory.getInstance().fromUrl(
|
||||
|
|
|
@ -23,6 +23,7 @@ import androidx.lifecycle.ViewModelProvider
|
|||
import androidx.preference.PreferenceManager
|
||||
import com.discord.panels.OverlappingPanelsLayout
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.chip.ChipDrawable
|
||||
import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings
|
||||
import com.lagradost.cloudstream3.APIHolder.getApiFromNameNull
|
||||
import com.lagradost.cloudstream3.APIHolder.updateHasTrailers
|
||||
|
@ -96,11 +97,10 @@ import kotlinx.android.synthetic.main.fragment_result.result_vpn
|
|||
import kotlinx.android.synthetic.main.fragment_result_swipe.*
|
||||
import kotlinx.android.synthetic.main.fragment_result_tv.*
|
||||
import kotlinx.android.synthetic.main.result_sync.*
|
||||
import kotlinx.android.synthetic.main.trailer_custom_layout.*
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.runBlocking
|
||||
|
||||
import com.google.android.material.chip.ChipDrawable
|
||||
|
||||
const val START_ACTION_RESUME_LATEST = 1
|
||||
const val START_ACTION_LOAD_EP = 2
|
||||
|
||||
|
@ -839,6 +839,8 @@ open class ResultFragment : ResultTrailerPlayer() {
|
|||
result_next_airing.setText(d.nextAiringEpisode)
|
||||
result_next_airing_time.setText(d.nextAiringDate)
|
||||
result_poster.setImage(d.posterImage)
|
||||
result_poster_background.setImage(d.posterBackgroundImage)
|
||||
//result_trailer_thumbnail.setImage(d.posterBackgroundImage, fadeIn = false)
|
||||
|
||||
if (d.posterImage != null && !isTrueTvSettings())
|
||||
result_poster_holder?.setOnClickListener {
|
||||
|
|
|
@ -5,6 +5,9 @@ import android.graphics.Rect
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
|
@ -20,27 +23,33 @@ import com.lagradost.cloudstream3.APIHolder.updateHasTrailers
|
|||
import com.lagradost.cloudstream3.mvvm.Some
|
||||
import com.lagradost.cloudstream3.mvvm.logError
|
||||
import com.lagradost.cloudstream3.mvvm.observe
|
||||
import com.lagradost.cloudstream3.ui.WatchType
|
||||
import com.lagradost.cloudstream3.ui.player.CSPlayerEvent
|
||||
import com.lagradost.cloudstream3.ui.search.SearchAdapter
|
||||
import com.lagradost.cloudstream3.ui.search.SearchHelper
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.openBrowser
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialogInstant
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIcons
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIconsAndNoStringRes
|
||||
import kotlinx.android.synthetic.main.fragment_result.*
|
||||
import kotlinx.android.synthetic.main.fragment_result.result_cast_items
|
||||
import kotlinx.android.synthetic.main.fragment_result.result_episodes_text
|
||||
import kotlinx.android.synthetic.main.fragment_result.result_resume_parent
|
||||
import kotlinx.android.synthetic.main.fragment_result.result_scroll
|
||||
import kotlinx.android.synthetic.main.fragment_result.result_smallscreen_holder
|
||||
import kotlinx.android.synthetic.main.fragment_result_swipe.*
|
||||
import kotlinx.android.synthetic.main.fragment_result_swipe.result_back
|
||||
import kotlinx.android.synthetic.main.fragment_result_tv.*
|
||||
import kotlinx.android.synthetic.main.fragment_trailer.*
|
||||
import kotlinx.android.synthetic.main.result_recommendations.*
|
||||
import kotlinx.android.synthetic.main.result_recommendations.result_recommendations
|
||||
import kotlinx.android.synthetic.main.trailer_custom_layout.*
|
||||
|
||||
|
||||
class ResultFragmentPhone : ResultFragment() {
|
||||
var currentTrailers: List<ExtractorLink> = emptyList()
|
||||
var currentTrailerIndex = 0
|
||||
|
@ -84,8 +93,36 @@ class ResultFragmentPhone : ResultFragment() {
|
|||
} ?: run {
|
||||
false
|
||||
}
|
||||
//result_trailer_thumbnail?.setImageBitmap(result_poster_background?.drawable?.toBitmap())
|
||||
|
||||
|
||||
result_trailer_loading?.isVisible = isSuccess
|
||||
result_smallscreen_holder?.isVisible = !isSuccess && !isFullScreenPlayer
|
||||
val turnVis = !isSuccess && !isFullScreenPlayer
|
||||
result_smallscreen_holder?.isVisible = turnVis
|
||||
result_poster_background_holder?.apply {
|
||||
val fadeIn: Animation = AlphaAnimation(alpha, if (turnVis) 1.0f else 0.0f).apply {
|
||||
interpolator = DecelerateInterpolator()
|
||||
duration = 200
|
||||
fillAfter = true
|
||||
}
|
||||
clearAnimation()
|
||||
startAnimation(fadeIn)
|
||||
}
|
||||
|
||||
//player_view?.apply {
|
||||
//alpha = 0.0f
|
||||
//ObjectAnimator.ofFloat(player_view, "alpha", 1f).apply {
|
||||
// duration = 200
|
||||
// start()
|
||||
//}
|
||||
|
||||
//val fadeIn: Animation = AlphaAnimation(0.0f, 1f).apply {
|
||||
// interpolator = DecelerateInterpolator()
|
||||
// duration = 2000
|
||||
// fillAfter = true
|
||||
//}
|
||||
//startAnimation(fadeIn)
|
||||
// }
|
||||
|
||||
// We don't want the trailer to be focusable if it's not visible
|
||||
result_smallscreen_holder?.descendantFocusability = if (isSuccess) {
|
||||
|
@ -129,7 +166,7 @@ class ResultFragmentPhone : ResultFragment() {
|
|||
down.nextFocusUpId = upper.id
|
||||
}
|
||||
|
||||
var selectSeason : String? = null
|
||||
var selectSeason: String? = null
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
val apiName = arguments?.getString(API_NAME_BUNDLE) ?: return
|
||||
|
@ -301,7 +338,8 @@ class ResultFragmentPhone : ResultFragment() {
|
|||
observe(viewModel.selectedSeason) { text ->
|
||||
result_season_button.setText(text)
|
||||
|
||||
selectSeason = (if (text is Some.Success) text.value else null)?.asStringNull(result_season_button?.context)
|
||||
selectSeason =
|
||||
(if (text is Some.Success) text.value else null)?.asStringNull(result_season_button?.context)
|
||||
// If the season button is visible the result season button will be next focus down
|
||||
if (result_season_button?.isVisible == true)
|
||||
if (result_resume_parent?.isVisible == true)
|
||||
|
@ -378,12 +416,16 @@ class ResultFragmentPhone : ResultFragment() {
|
|||
r to (text?.asStringNull(ctx) ?: return@mapNotNull null)
|
||||
}
|
||||
|
||||
activity?.showDialog(names.map { it.second },names.indexOfFirst { it.second == selectSeason },"",false,{}) { itemId->
|
||||
activity?.showDialog(
|
||||
names.map { it.second },
|
||||
names.indexOfFirst { it.second == selectSeason },
|
||||
"",
|
||||
false,
|
||||
{}) { itemId ->
|
||||
viewModel.changeSeason(names[itemId].first)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//view.popupMenuNoIconsAndNoStringRes(names.mapIndexed { index, (_, name) ->
|
||||
// index to name
|
||||
//}) {
|
||||
|
|
|
@ -13,7 +13,9 @@ import com.lagradost.cloudstream3.R
|
|||
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.result_smallscreen_holder
|
||||
import kotlinx.android.synthetic.main.fragment_result_swipe.*
|
||||
import kotlinx.android.synthetic.main.fragment_result_tv.*
|
||||
import kotlinx.android.synthetic.main.fragment_trailer.*
|
||||
import kotlinx.android.synthetic.main.trailer_custom_layout.*
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ data class ResultData(
|
|||
var syncData: Map<String, String>,
|
||||
|
||||
val posterImage: UiImage?,
|
||||
val posterBackgroundImage: UiImage?,
|
||||
val plotText: UiText,
|
||||
val apiName: UiText,
|
||||
val ratingText: UiText?,
|
||||
|
@ -170,6 +171,9 @@ fun LoadResponse.toResultData(repo: APIRepository): ResultData {
|
|||
posterImage = img(
|
||||
posterUrl, posterHeaders
|
||||
) ?: img(R.drawable.default_cover),
|
||||
posterBackgroundImage = img(
|
||||
backgroundPosterUrl ?: posterUrl, posterHeaders
|
||||
) ?: img(R.drawable.default_cover),
|
||||
titleText = txt(name),
|
||||
url = url,
|
||||
tags = tags ?: emptyList(),
|
||||
|
|
|
@ -70,9 +70,9 @@ sealed class UiImage {
|
|||
data class Drawable(@DrawableRes val resId: Int) : UiImage()
|
||||
}
|
||||
|
||||
fun ImageView?.setImage(value: UiImage?) {
|
||||
fun ImageView?.setImage(value: UiImage?, fadeIn: Boolean = true) {
|
||||
when (value) {
|
||||
is UiImage.Image -> setImageImage(value)
|
||||
is UiImage.Image -> setImageImage(value,fadeIn)
|
||||
is UiImage.Drawable -> setImageDrawable(value)
|
||||
null -> {
|
||||
this?.isVisible = false
|
||||
|
@ -80,9 +80,9 @@ fun ImageView?.setImage(value: UiImage?) {
|
|||
}
|
||||
}
|
||||
|
||||
fun ImageView?.setImageImage(value: UiImage.Image) {
|
||||
fun ImageView?.setImageImage(value: UiImage.Image, fadeIn: Boolean = true) {
|
||||
if (this == null) return
|
||||
this.isVisible = setImage(value.url, value.headers, value.errorDrawable)
|
||||
this.isVisible = setImage(value.url, value.headers, value.errorDrawable, fadeIn)
|
||||
}
|
||||
|
||||
fun ImageView?.setImageDrawable(value: UiImage.Drawable) {
|
||||
|
|
|
@ -136,7 +136,7 @@ object UIHelper {
|
|||
navigation, arguments
|
||||
)
|
||||
}
|
||||
} catch (t : Throwable) {
|
||||
} catch (t: Throwable) {
|
||||
logError(t)
|
||||
}
|
||||
}
|
||||
|
@ -159,17 +159,20 @@ object UIHelper {
|
|||
url: String?,
|
||||
headers: Map<String, String>? = null,
|
||||
@DrawableRes
|
||||
errorImageDrawable: Int? = null
|
||||
errorImageDrawable: Int? = null,
|
||||
fadeIn: Boolean = true
|
||||
): Boolean {
|
||||
if (this == null || url.isNullOrBlank()) return false
|
||||
|
||||
return try {
|
||||
val builder = GlideApp.with(this)
|
||||
.load(GlideUrl(url) { headers ?: emptyMap() }).transition(
|
||||
DrawableTransitionOptions.withCrossFade()
|
||||
)
|
||||
.load(GlideUrl(url) { headers ?: emptyMap() })
|
||||
.skipMemoryCache(true)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL).let { req ->
|
||||
if (fadeIn)
|
||||
req.transition(DrawableTransitionOptions.withCrossFade())
|
||||
else req
|
||||
}
|
||||
|
||||
val res = if (errorImageDrawable != null)
|
||||
builder.error(errorImageDrawable).into(this)
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:keepScreenOn="true"
|
||||
android:id="@+id/player_background"
|
||||
app:backgroundTint="@android:color/black"
|
||||
android:background="@android:color/black"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="horizontal"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
app:backgroundTint="@android:color/black"
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/result_root"
|
||||
style="@style/DarkFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/DarkFragment"
|
||||
android:background="?attr/primaryBlackBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
@ -122,9 +122,9 @@
|
|||
android:id="@+id/result_finish_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:orientation="vertical">
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/result_scroll"
|
||||
|
@ -139,18 +139,19 @@
|
|||
android:background="?attr/primaryBlackBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--
|
||||
<com.facebook.shimmer.ShimmerFrameLayout
|
||||
tools:visibility="gone"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/result_trailer_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:shimmer_auto_start="true"
|
||||
app:shimmer_base_alpha="0.2"
|
||||
app:shimmer_duration="@integer/loading_time"
|
||||
app:shimmer_highlight_alpha="0.3">
|
||||
app:shimmer_highlight_alpha="0.3"
|
||||
tools:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -159,22 +160,15 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:background="@color/grayShimmer"
|
||||
app:cardCornerRadius="@dimen/loading_radius"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:foreground="@drawable/outline_drawable" />
|
||||
android:background="@color/grayShimmer"
|
||||
android:foreground="@drawable/outline_drawable"
|
||||
app:cardCornerRadius="@dimen/loading_radius" />
|
||||
</LinearLayout>
|
||||
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:id="@+id/result_smallscreen_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/fragment_trailer" />
|
||||
</FrameLayout>
|
||||
|
||||
<!--
|
||||
<FrameLayout
|
||||
|
@ -272,6 +266,36 @@
|
|||
app:tint="?attr/textColor" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>-->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/result_smallscreen_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<include layout="@layout/fragment_trailer" />
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/result_poster_background_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
android:id="@+id/result_poster_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/background_shadow" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -281,6 +305,7 @@
|
|||
android:paddingStart="@dimen/result_padding"
|
||||
android:paddingEnd="@dimen/result_padding">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -289,10 +314,12 @@
|
|||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/result_poster_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="@dimen/rounded_image_radius">
|
||||
|
||||
<ImageView
|
||||
|
@ -312,7 +339,6 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:id="@+id/result_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -324,7 +350,6 @@
|
|||
tools:text="The Perfect Run The Perfect Run" />
|
||||
|
||||
<com.lagradost.cloudstream3.widget.FlowLayout
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:itemSpacing="10dp">
|
||||
|
@ -366,20 +391,19 @@
|
|||
The focus outline now settles between the poster and text.
|
||||
-->
|
||||
<FrameLayout
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:padding="5dp"
|
||||
android:maxLength="1000"
|
||||
android:ellipsize="end"
|
||||
android:id="@+id/result_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:foreground="@drawable/outline_drawable"
|
||||
android:maxLength="1000"
|
||||
android:nextFocusUp="@id/result_back"
|
||||
android:nextFocusDown="@id/result_bookmark_button"
|
||||
android:paddingTop="5dp"
|
||||
android:textColor="?attr/textColor"
|
||||
android:textSize="15sp"
|
||||
tools:text="Ryan Quicksave Romano is an eccentric adventurer with a strange power: he can create a save-point in time and redo his life whenever he dies. Arriving in New Rome, the glitzy capital of sin of a rebuilding Europe, he finds the city torn between mega-corporations, sponsored heroes, superpowered criminals, and true monsters. It's a time of chaos, where potions can grant the power to rule the world and dangers lurk everywhere. " />
|
||||
|
@ -389,12 +413,13 @@
|
|||
android:layout_height="30dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:src="@drawable/background_shadow"
|
||||
android:visibility="gone"
|
||||
tools:ignore="ContentDescription" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/result_bookmark_button"
|
||||
style="@style/BlackButton"
|
||||
|
@ -417,7 +442,7 @@
|
|||
app:icon="@drawable/ic_baseline_bookmark_24"
|
||||
tools:text="Bookmark"
|
||||
tools:visibility="visible" />
|
||||
-->
|
||||
-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result_cast_text"
|
||||
|
@ -431,23 +456,23 @@
|
|||
tools:text="Cast: Joe Ligma" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
tools:visibility="gone"
|
||||
android:nextFocusUp="@id/result_bookmark_button"
|
||||
android:nextFocusDown="@id/result_play_movie"
|
||||
|
||||
android:id="@+id/result_cast_items"
|
||||
android:layout_width="match_parent"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:fadingEdge="horizontal"
|
||||
android:focusableInTouchMode="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nextFocusUp="@id/result_bookmark_button"
|
||||
android:nextFocusDown="@id/result_play_movie"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="2"
|
||||
tools:listitem="@layout/cast_item" />
|
||||
tools:listitem="@layout/cast_item"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result_vpn"
|
||||
|
@ -847,29 +872,29 @@
|
|||
<!--TODO add next airing-->
|
||||
<LinearLayout
|
||||
android:id="@+id/result_next_airing_holder"
|
||||
android:layout_gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
|
||||
android:id="@+id/result_next_airing"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="?attr/grayTextColor"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="normal"
|
||||
tools:text="Episode 1022 will be released in" />
|
||||
|
||||
<TextView
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:gravity="center"
|
||||
android:id="@+id/result_next_airing_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="?attr/textColor"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="normal"
|
||||
|
@ -917,9 +942,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:clipToPadding="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:paddingBottom="100dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/result_episode_both_tv" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
android:orientation="horizontal"
|
||||
android:keepScreenOn="true"
|
||||
android:id="@+id/player_background"
|
||||
app:backgroundTint="@android:color/black"
|
||||
android:background="@android:color/black"
|
||||
|
|
|
@ -38,26 +38,41 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
<!-- <View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/player_gradient_tv" />
|
||||
-->
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:id="@+id/result_trailer_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop" />-->
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/background_shadow" />
|
||||
|
||||
<TextView
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/trailer"
|
||||
android:padding="10dp"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|bottom"
|
||||
android:padding="10dp"
|
||||
android:text="@string/trailer"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/play_button"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp" />
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/play_button" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -67,54 +82,54 @@
|
|||
|
||||
<!--use for thinner app:trackThickness="3dp" com.google.android.material.progressindicator.CircularProgressIndicator-->
|
||||
<ProgressBar
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/player_buffering"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:focusable="false"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/player_buffering"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<!-- This nested layout is necessary because of buffering and clicking-->
|
||||
<FrameLayout
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- This nested layout is necessary because of buffering and clicking-->
|
||||
<FrameLayout
|
||||
android:id="@+id/player_pause_play_holder_holder"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:id="@+id/player_pause_play_holder_holder">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<FrameLayout
|
||||
tools:ignore="uselessParent"
|
||||
android:id="@+id/player_pause_play_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="uselessParent">
|
||||
|
||||
<ImageView
|
||||
app:tint="@color/white"
|
||||
android:id="@+id/player_pause_play"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/video_tap_button"
|
||||
android:nextFocusLeft="@id/exo_rew"
|
||||
|
||||
android:nextFocusRight="@id/exo_ffwd"
|
||||
|
||||
android:nextFocusUp="@id/player_go_back"
|
||||
android:nextFocusDown="@id/player_lock"
|
||||
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:src="@drawable/netflix_pause"
|
||||
android:background="@drawable/video_tap_button"
|
||||
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
app:tint="@color/white"
|
||||
tools:ignore="ContentDescription" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
@ -135,12 +150,12 @@
|
|||
android:id="@+id/player_rew_holder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintWidth_percent="0.5"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/player_ffwd_holder"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.5">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_rew_text"
|
||||
|
@ -169,21 +184,21 @@
|
|||
android:scaleType="fitCenter"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/netflix_skip_forward"
|
||||
app:tint="@color/white"
|
||||
android:tintMode="src_in"
|
||||
app:tint="@color/white"
|
||||
tools:ignore="ContentDescription" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/player_ffwd_holder"
|
||||
android:layout_width="0dp"
|
||||
app:layout_constraintWidth_percent="0.5"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/player_rew_holder"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.5">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_ffwd_text"
|
||||
|
@ -209,8 +224,8 @@
|
|||
android:padding="10dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/netflix_skip_forward"
|
||||
app:tint="@color/white"
|
||||
android:tintMode="src_in"
|
||||
app:tint="@color/white"
|
||||
tools:ignore="ContentDescription" />
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -230,60 +245,60 @@
|
|||
<ImageButton
|
||||
android:id="@id/exo_prev"
|
||||
style="@style/ExoMediaButton.Previous"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_repeat_toggle"
|
||||
style="@style/ExoMediaButton"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_next"
|
||||
style="@style/ExoMediaButton.Next"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_vr"
|
||||
style="@style/ExoMediaButton.VR"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_play"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
tools:ignore="ContentDescription"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="0dp" />
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_pause"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
android:tintMode="src_in"
|
||||
tools:ignore="ContentDescription"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="0dp" />
|
||||
android:tintMode="src_in"
|
||||
app:tint="?attr/colorPrimaryDark"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:id="@+id/player_open_source"
|
||||
app:tint="@color/white"
|
||||
android:src="@drawable/ic_baseline_public_24"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_baseline_public_24"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_player_bar"
|
||||
|
@ -296,10 +311,10 @@
|
|||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/player_video_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
@ -350,14 +365,14 @@
|
|||
</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="20dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp" />
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/baseline_fullscreen_24"
|
||||
app:tint="@color/white" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@ -397,14 +412,14 @@
|
|||
style="@android:style/Widget.Material.ProgressBar.Horizontal"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerInParent="true"
|
||||
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" />
|
||||
tools:progress="30" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -82,6 +82,8 @@
|
|||
<item name="textColor">@color/chip_color_text</item>
|
||||
<item name="android:textColor">@color/chip_color_text</item>
|
||||
<item name="checkedIconTint">@color/chip_color_text</item>
|
||||
<item name="fontFamily">@font/google_sans</item>
|
||||
<item name="android:fontFamily">@font/google_sans</item>
|
||||
</style>
|
||||
|
||||
<style name="AmoledMode">
|
||||
|
|
Loading…
Reference in a new issue