testing tv UI, NOT FINISHED

This commit is contained in:
LagradOst 2023-07-23 03:07:24 +02:00
parent 5aa9019d6d
commit 35084389a1
5 changed files with 870 additions and 640 deletions

View file

@ -44,6 +44,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.hideKeyboard
import com.lagradost.cloudstream3.utils.UIHelper.navigate import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
import com.lagradost.cloudstream3.utils.UIHelper.setImage import com.lagradost.cloudstream3.utils.UIHelper.setImage
import com.lagradost.cloudstream3.utils.UIHelper.setImageBlur
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
class ResultFragmentTv : Fragment() { class ResultFragmentTv : Fragment() {
@ -192,7 +193,7 @@ class ResultFragmentTv : Fragment() {
binding?.apply { binding?.apply {
resultEpisodes.layoutManager = resultEpisodes.layoutManager =
LinearListLayout(resultEpisodes.context).apply { LinearListLayout(resultEpisodes.context).apply {
setHorizontal() setVertical()
} }
resultReloadConnectionerror.setOnClickListener { resultReloadConnectionerror.setOnClickListener {
@ -222,9 +223,9 @@ class ResultFragmentTv : Fragment() {
// Always escape focus // Always escape focus
if (hasFocus) binding?.resultBookmarkButton?.requestFocus() if (hasFocus) binding?.resultBookmarkButton?.requestFocus()
} }
resultBack.setOnClickListener { //resultBack.setOnClickListener {
activity?.popCurrentPage() // activity?.popCurrentPage()
} //}
resultRecommendationsList.spanCount = 8 resultRecommendationsList.spanCount = 8
resultRecommendationsList.adapter = resultRecommendationsList.adapter =
@ -581,6 +582,8 @@ class ResultFragmentTv : Fragment() {
} }
} }
backgroundPoster.setImage(d.posterBackgroundImage, radius = 10)
resultComingSoon.isVisible = d.comingSoon resultComingSoon.isVisible = d.comingSoon
resultDataHolder.isGone = d.comingSoon resultDataHolder.isGone = d.comingSoon
UIHelper.populateChips(resultTag, d.tags) UIHelper.populateChips(resultTag, d.tags)

View file

@ -260,6 +260,8 @@ object UIHelper {
@DrawableRes @DrawableRes
errorImageDrawable: Int? = null, errorImageDrawable: Int? = null,
fadeIn: Boolean = true, fadeIn: Boolean = true,
radius: Int = 0,
sample: Int = 3,
colorCallback: ((Palette) -> Unit)? = null colorCallback: ((Palette) -> Unit)? = null
): Boolean { ): Boolean {
if (url.isNullOrBlank()) return false if (url.isNullOrBlank()) return false
@ -267,6 +269,8 @@ object UIHelper {
UiImage.Image(url, headers, errorImageDrawable), UiImage.Image(url, headers, errorImageDrawable),
errorImageDrawable, errorImageDrawable,
fadeIn, fadeIn,
radius,
sample,
colorCallback colorCallback
) )
return true return true
@ -277,7 +281,9 @@ object UIHelper {
@DrawableRes @DrawableRes
errorImageDrawable: Int? = null, errorImageDrawable: Int? = null,
fadeIn: Boolean = true, fadeIn: Boolean = true,
colorCallback: ((Palette) -> Unit)? = null radius: Int = 0,
sample: Int = 3,
colorCallback: ((Palette) -> Unit)? = null,
): Boolean { ): Boolean {
if (this == null || uiImage == null) return false if (this == null || uiImage == null) return false
@ -289,7 +295,7 @@ object UIHelper {
} ?: return false } ?: return false
return try { return try {
val builder = GlideApp.with(this) var builder = GlideApp.with(this)
.load(glideImage) .load(glideImage)
.skipMemoryCache(true) .skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.ALL).let { req -> .diskCacheStrategy(DiskCacheStrategy.ALL).let { req ->
@ -298,8 +304,12 @@ object UIHelper {
else req else req
} }
if(radius > 0) {
builder = builder.apply(bitmapTransform(BlurTransformation(radius, sample)))
}
if (colorCallback != null) { if (colorCallback != null) {
builder.listener(object : RequestListener<Drawable> { builder = builder.listener(object : RequestListener<Drawable> {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
override fun onResourceReady( override fun onResourceReady(
resource: Drawable?, resource: Drawable?,

View file

@ -1,4 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
https://developer.android.com/design/ui/tv/guides/foundations/navigation-on-tv
1. Don't display a back button
https://developer.android.com/design/ui/tv/guides/styles/layouts
Two-pane layout
or https://developer.android.com/design/ui/tv/guides/styles/layouts#layout-templates
cast:
https://developer.android.com/design/ui/tv/guides/components/cards#1:1
https://developer.android.com/design/ui/tv/samples/jet-fit
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
@ -112,34 +124,362 @@
android:textColor="?attr/textColor" /> android:textColor="?attr/textColor" />
</LinearLayout> </LinearLayout>
<FrameLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="200dp">
<ImageView
android:id="@+id/background_poster"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="centerCrop"
tools:src="@drawable/example_poster" />
<ImageView
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_gravity="bottom"
android:src="@drawable/background_shadow">
</ImageView>
</FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/result_finish_loading" android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_weight="1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/right_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/left_layout"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/result_title"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginBottom="5dp"
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="?attr/textColor"
android:textSize="20sp"
android:textStyle="bold"
tools:text="The Perfect Run The Perfect Run" />
</LinearLayout>
<LinearLayout
android:id="@+id/left_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/right_layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.lagradost.cloudstream3.widget.FlowLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:itemSpacing="10dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/result_meta_site"
style="@style/SmallBlackButton"
android:layout_gravity="center_vertical"
tools:text="Gogoanime" />
<TextView
android:id="@+id/result_meta_type"
style="@style/ResultInfoText"
tools:text="Movie" />
<TextView
android:id="@+id/result_meta_year"
style="@style/ResultInfoText"
tools:text="2022" />
<TextView
android:id="@+id/result_meta_rating"
style="@style/ResultInfoText"
tools:text="Rated: 8.5/10.0" />
<TextView
android:id="@+id/result_meta_status"
style="@style/ResultInfoText"
tools:text="Ongoing" />
<TextView
android:id="@+id/result_meta_duration"
style="@style/ResultInfoText"
tools:text="121min" />
</com.lagradost.cloudstream3.widget.FlowLayout>
<TextView
android:id="@+id/result_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:fadingEdgeLength="30dp"
android:foreground="@drawable/outline_drawable"
android:maxLines="7"
android:nextFocusUp="@id/result_back"
android:nextFocusDown="@id/result_bookmark_button"
android:padding="5dp"
android:requiresFadingEdge="vertical"
android:textColor="?attr/textColor"
android:textSize="12sp"
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. " />
<com.google.android.material.chip.ChipGroup
android:id="@+id/result_tag"
style="@style/ChipParent"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/result_resume_progress_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
<androidx.core.widget.NestedScrollView <androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/result_scroll" android:id="@+id/result_resume_series_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_gravity="end|center_vertical"
android:layout_weight="1"
android:indeterminate="false"
android:max="100"
android:paddingEnd="10dp"
android:progress="0"
android:progressBackgroundTint="?attr/colorPrimary"
android:visibility="visible"
tools:progress="50"
tools:visibility="visible" />
android:layout_height="wrap_content" <TextView
android:background="?attr/primaryGrayBackground"> android:id="@+id/result_resume_series_progress_text"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBlackBackground"
android:orientation="vertical">
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/result_trailer_loading"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical" android:layout_weight="0"
android:gravity="center"
android:maxLines="1"
android:paddingEnd="5dp"
android:textColor="?attr/grayTextColor"
tools:ignore="RtlSymmetry"
tools:text="69m remaining" />
</LinearLayout>
<LinearLayout
android:id="@+id/result_next_airing_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:orientation="vertical">
<TextView
android:visibility="gone" android:visibility="gone"
android:id="@+id/result_episodes_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="20dp"
android:textColor="?attr/textColor"
android:textSize="17sp"
android:textStyle="normal"
tools:text="8 Episodes" />
<TextView
android:id="@+id/result_next_airing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:textColor="?attr/grayTextColor"
android:textSize="17sp"
android:textStyle="normal"
tools:text="Episode 1022 will be released in" />
<TextView
android:id="@+id/result_next_airing_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="?attr/textColor"
android:textSize="17sp"
android:textStyle="normal"
tools:text="5d 3h 30m" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/result_movie_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:orientation="vertical"
tools:visibility="visible">
<com.google.android.material.button.MaterialButton
android:id="@+id/result_play_movie"
style="@style/ResultButtonTV"
android:nextFocusUp="@id/result_back"
android:nextFocusDown="@id/result_play_series"
android:text="@string/play_movie_button"
android:visibility="visible"
app:icon="@drawable/ic_baseline_play_arrow_24">
</com.google.android.material.button.MaterialButton>
<LinearLayout
android:id="@+id/series_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.button.MaterialButton
android:id="@+id/result_play_series"
style="@style/ResultButtonTV"
android:nextFocusUp="@id/result_play_movie"
android:nextFocusDown="@id/result_resume_series"
android:text="@string/play_episode"
android:visibility="visible"
app:icon="@drawable/ic_baseline_play_arrow_24"
tools:visibility="gone" />
<com.google.android.material.button.MaterialButton
android:id="@+id/result_resume_series"
style="@style/ResultButtonTV"
android:nextFocusUp="@id/result_play_series"
android:nextFocusDown="@id/result_play_trailer"
android:text="@string/resume"
android:visibility="visible"
app:icon="@drawable/ic_baseline_play_arrow_24"
tools:visibility="gone" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/result_play_trailer"
style="@style/ResultButtonTV"
android:nextFocusUp="@id/result_resume_series"
android:nextFocusDown="@id/result_bookmark_button"
android:text="@string/play_trailer_button"
android:visibility="gone"
app:icon="@drawable/ic_baseline_play_arrow_24"
tools:visibility="gone">
</com.google.android.material.button.MaterialButton>
<!-- <com.lagradost.cloudstream3.ui.download.button.DownloadButton
android:visibility="gone"
android:id="@+id/download_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="250dp"
app:download_layout="@layout/download_button_layout" />
-->
<com.google.android.material.button.MaterialButton
android:id="@+id/result_bookmark_button"
style="@style/ResultButtonTV"
android:nextFocusUp="@id/result_play_trailer"
android:nextFocusDown="@id/result_resume_series_button"
android:text="@string/type_none"
android:visibility="visible"
app:icon="@drawable/ic_baseline_bookmark_24" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_season_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_resume_series_button"
android:nextFocusDown="@id/result_range_selection"
android:orientation="vertical"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_range_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_season_selection"
android:nextFocusDown="@id/result_dub_selection"
android:orientation="vertical"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_dub_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_range_selection"
android:nextFocusDown="@id/result_episodes"
android:orientation="vertical"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/result_episode_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:orientation="vertical"
app:shimmer_auto_start="true" app:shimmer_auto_start="true"
app:shimmer_base_alpha="0.2" app:shimmer_base_alpha="0.2"
app:shimmer_duration="@integer/loading_time" app:shimmer_duration="@integer/loading_time"
@ -149,17 +489,56 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/result_padding"
android:orientation="vertical"> android:orientation="vertical">
<androidx.cardview.widget.CardView <include layout="@layout/loading_episode" />
android:layout_width="match_parent"
android:layout_height="150dp" <include layout="@layout/loading_episode" />
android:background="@color/grayShimmer"
android:foreground="@drawable/outline_drawable" <include layout="@layout/loading_episode" />
app:cardCornerRadius="@dimen/loading_radius" />
<include layout="@layout/loading_episode" />
</LinearLayout> </LinearLayout>
</com.facebook.shimmer.ShimmerFrameLayout> </com.facebook.shimmer.ShimmerFrameLayout>
<!--<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/result_episode_loading"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_gravity="center"
android:layout_width="50dp"
android:layout_height="50dp" />-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_episodes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:nextFocusUp="@id/result_dub_selection"
android:nextFocusDown="@id/result_recommendations_filter_selection"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_episode" />
<View
android:id="@+id/temporary_no_focus"
android:layout_width="1dp"
android:layout_height="1dp"
android:focusable="false"
android:nextFocusLeft="@id/temporary_no_focus"
android:nextFocusRight="@id/temporary_no_focus"
android:nextFocusUp="@id/temporary_no_focus"
android:nextFocusDown="@id/temporary_no_focus" />
</LinearLayout>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/result_finish_loading"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -167,7 +546,8 @@
android:clipToPadding="false" android:clipToPadding="false"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="@dimen/result_padding" android:paddingStart="@dimen/result_padding"
android:paddingEnd="@dimen/result_padding"> android:paddingEnd="@dimen/result_padding"
android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -188,6 +568,7 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:orientation="horizontal"> android:orientation="horizontal">
<!--
<ImageView <ImageView
android:id="@+id/result_back" android:id="@+id/result_back"
android:layout_width="30dp" android:layout_width="30dp"
@ -201,25 +582,15 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:nextFocusDown="@id/result_play_movie" android:nextFocusDown="@id/result_play_movie"
android:src="@drawable/ic_baseline_arrow_back_24" android:src="@drawable/ic_baseline_arrow_back_24"
app:tint="?attr/white" /> app:tint="?attr/white" />-->
<TextView
android:id="@+id/result_title"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginBottom="5dp"
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="?attr/textColor"
android:textSize="20sp"
android:textStyle="bold"
tools:text="The Perfect Run The Perfect Run" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<!--
<LinearLayout <LinearLayout
android:id="@+id/result_movie_parent" android:id="@+id/result_movie_parent"
@ -232,7 +603,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/result_play_movie" android:id="@+id/result_play_movie"
style="@style/WhiteButton" style="@style/RegularButtonTV"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
@ -250,15 +621,16 @@
<LinearLayout <LinearLayout
android:id="@+id/series_holder" android:id="@+id/series_holder"
android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/result_play_series" android:id="@+id/result_play_series"
style="@style/WhiteButton" style="@style/RegularButtonTV"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_weight="1" android:layout_weight="1"
@ -267,14 +639,15 @@
android:nextFocusDown="@id/result_resume_series" android:nextFocusDown="@id/result_resume_series"
android:text="@string/play_episode" android:text="@string/play_episode"
android:visibility="visible" android:visibility="visible"
app:icon="@drawable/ic_baseline_play_arrow_24" /> app:icon="@drawable/ic_baseline_play_arrow_24"
tools:visibility="gone" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/result_resume_series" android:id="@+id/result_resume_series"
style="@style/WhiteButton" style="@style/RegularButtonTV"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_weight="1" android:layout_weight="1"
@ -283,14 +656,15 @@
android:nextFocusDown="@id/result_play_trailer" android:nextFocusDown="@id/result_play_trailer"
android:text="@string/resume" android:text="@string/resume"
android:visibility="visible" android:visibility="visible"
app:icon="@drawable/ic_baseline_play_arrow_24" /> app:icon="@drawable/ic_baseline_play_arrow_24"
tools:visibility="gone" />
</LinearLayout> </LinearLayout>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/result_play_trailer" android:id="@+id/result_play_trailer"
style="@style/WhiteButton" style="@style/RegularButtonTV"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
@ -306,19 +680,9 @@
</com.google.android.material.button.MaterialButton> </com.google.android.material.button.MaterialButton>
<!-- <com.lagradost.cloudstream3.ui.download.button.DownloadButton
android:visibility="gone"
android:id="@+id/download_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="250dp"
app:download_layout="@layout/download_button_layout" />
-->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/result_bookmark_button" android:id="@+id/result_bookmark_button"
style="@style/BlackButton" style="@style/RegularButtonTV"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
@ -330,6 +694,7 @@
android:nextFocusDown="@id/result_resume_series_button" android:nextFocusDown="@id/result_resume_series_button"
android:text="@string/type_none" android:text="@string/type_none"
android:visibility="visible" /> android:visibility="visible" />
<LinearLayout <LinearLayout
android:id="@+id/result_resume_progress_holder" android:id="@+id/result_resume_progress_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -370,7 +735,7 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
-->
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/result_poster_holder" android:id="@+id/result_poster_holder"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -390,6 +755,7 @@
tools:src="@drawable/example_poster" /> tools:src="@drawable/example_poster" />
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<!--
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -431,10 +797,7 @@
style="@style/ResultInfoText" style="@style/ResultInfoText"
tools:text="121min" /> tools:text="121min" />
</com.lagradost.cloudstream3.widget.FlowLayout> </com.lagradost.cloudstream3.widget.FlowLayout>
<!--
This has half margin and half padding to make TV focus on description look better.
The focus outline now settles between the poster and text.
-->
<TextView <TextView
android:id="@+id/result_description" android:id="@+id/result_description"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -451,6 +814,11 @@
android:textSize="15sp" 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. " /> 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. " />
</LinearLayout> </LinearLayout>
-->
<!--
This has half margin and half padding to make TV focus on description look better.
The focus outline now settles between the poster and text.
-->
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -466,25 +834,6 @@
android:textSize="15sp" android:textSize="15sp"
tools:text="Cast: Joe Ligma" /> tools:text="Cast: Joe Ligma" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_cast_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="afterDescendants"
android:fadingEdge="horizontal"
android:focusable="false"
android:focusableInTouchMode="false"
android:nextFocusUp="@id/result_back"
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:visibility="visible" />
<TextView <TextView
android:id="@+id/result_vpn" android:id="@+id/result_vpn"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -511,24 +860,6 @@
android:textSize="15sp" android:textSize="15sp"
tools:text="@string/no_episodes_found" /> tools:text="@string/no_episodes_found" />
<TextView
android:id="@+id/result_tag_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="@string/result_tags"
android:textColor="?attr/textColor"
android:textSize="17sp"
android:textStyle="normal"
android:visibility="gone" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/result_tag"
style="@style/ChipParent"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView <TextView
android:id="@+id/result_coming_soon" android:id="@+id/result_coming_soon"
@ -626,147 +957,27 @@
</LinearLayout>--> </LinearLayout>-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_season_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_resume_series_button"
android:nextFocusDown="@id/result_range_selection"
android:orientation="horizontal"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_range_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_season_selection"
android:nextFocusDown="@id/result_dub_selection"
android:orientation="horizontal"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_dub_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusUp="@id/result_range_selection"
android:nextFocusDown="@id/result_episodes"
android:orientation="horizontal"
android:paddingBottom="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_selection" />
<LinearLayout
android:id="@+id/result_next_airing_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/result_episodes_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="20dp"
android:textColor="?attr/textColor"
android:textSize="17sp"
android:textStyle="normal"
tools:text="8 Episodes" />
<TextView
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: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"
tools:text="5d 3h 30m" />
</LinearLayout> </LinearLayout>
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/result_episode_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:orientation="vertical"
app:shimmer_auto_start="true"
app:shimmer_base_alpha="0.2"
app:shimmer_duration="@integer/loading_time"
app:shimmer_highlight_alpha="0.3"
tools:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/loading_episode" />
<include layout="@layout/loading_episode" />
<include layout="@layout/loading_episode" />
<include layout="@layout/loading_episode" />
</LinearLayout>
</com.facebook.shimmer.ShimmerFrameLayout>
<!--<androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/result_episode_loading"
style="@style/Widget.AppCompat.ProgressBar"
android:layout_gravity="center"
android:layout_width="50dp"
android:layout_height="50dp" />-->
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/result_episodes" android:id="@+id/result_cast_items"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:descendantFocusability="afterDescendants"
android:nextFocusUp="@id/result_dub_selection"
android:nextFocusDown="@id/result_recommendations_filter_selection"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/result_episode" />
<View android:fadingEdge="horizontal"
android:id="@+id/temporary_no_focus"
android:layout_width="1dp"
android:layout_height="1dp"
android:focusable="false" android:focusable="false"
android:nextFocusLeft="@id/temporary_no_focus" android:focusableInTouchMode="false"
android:nextFocusRight="@id/temporary_no_focus" android:nextFocusUp="@id/result_back"
android:nextFocusUp="@id/temporary_no_focus" android:nextFocusDown="@id/result_play_movie"
android:nextFocusDown="@id/temporary_no_focus" /> android:orientation="horizontal"
</LinearLayout> android:paddingTop="5dp"
</LinearLayout> android:requiresFadingEdge="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/cast_item"
tools:visibility="visible" />
<LinearLayout <LinearLayout
android:id="@+id/result_recommendations_holder" android:id="@+id/result_recommendations_holder"
@ -813,7 +1024,6 @@
tools:listitem="@layout/search_result_grid" /> tools:listitem="@layout/search_result_grid" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--style="@style/SelectableButton"-->
<com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android" <com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
style="@style/SelectableButton" style="@style/RegularButtonTV"
android:layout_gravity="start"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
tools:text="Season 1" /> tools:text="Season 1" />

View file

@ -723,6 +723,11 @@
<item name="strokeColor">@color/tag_stroke_color</item> <item name="strokeColor">@color/tag_stroke_color</item>
</style> </style>
<style name="ResultButtonTV" parent="@style/RegularButtonTV">
<item name="android:layout_width">250dp</item>
<item name="android:layout_marginBottom">5dp</item>
</style>
<style name="RegularButtonTV"> <style name="RegularButtonTV">
<item name="android:stateListAnimator">@null</item> <item name="android:stateListAnimator">@null</item>
<item name="strokeColor">@color/transparent</item> <item name="strokeColor">@color/transparent</item>
@ -734,15 +739,15 @@
<item name="iconTint">@color/player_on_button_tv</item> <item name="iconTint">@color/player_on_button_tv</item>
<item name="textColor">@color/player_on_button_tv</item> <item name="textColor">@color/player_on_button_tv</item>
<item name="android:textColor">@color/player_on_button_tv</item> <item name="android:textColor">@color/player_on_button_tv</item>
<item name="android:layout_width">200dp</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">30dp</item> <item name="android:layout_height">40dp</item>
<item name="iconSize">16dp</item> <item name="iconSize">16dp</item>
<item name="android:gravity">center</item> <item name="android:gravity">center</item>
<item name="android:layout_gravity">center</item> <item name="android:layout_gravity">center</item>
<item name="android:baselineAligned">false</item> <item name="android:baselineAligned">false</item>
<item name="textAllCaps">false</item> <item name="textAllCaps">false</item>
<item name="android:textStyle">bold</item> <item name="android:textStyle">bold</item>
<item name="android:textSize">10sp</item> <item name="android:textSize">14sp</item>
<item name="android:layout_marginStart">4dp</item> <item name="android:layout_marginStart">4dp</item>
<item name="android:layout_marginEnd">4dp</item> <item name="android:layout_marginEnd">4dp</item>
<item name="android:insetBottom">0dp</item> <item name="android:insetBottom">0dp</item>