mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Coming soon support
This commit is contained in:
parent
1f31726b11
commit
8168971847
2 changed files with 24 additions and 6 deletions
|
@ -246,6 +246,7 @@ class ResultFragmentTv : Fragment() {
|
||||||
storedData.start
|
storedData.start
|
||||||
)
|
)
|
||||||
// ===== ===== =====
|
// ===== ===== =====
|
||||||
|
var comingSoon = false
|
||||||
|
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
//episodesShadow.rotationX = 180.0f//if(episodesShadow.isRtl()) 180.0f else 0.0f
|
//episodesShadow.rotationX = 180.0f//if(episodesShadow.isRtl()) 180.0f else 0.0f
|
||||||
|
@ -648,8 +649,7 @@ class ResultFragmentTv : Fragment() {
|
||||||
if (data == null) return@observeNullable
|
if (data == null) return@observeNullable
|
||||||
|
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
|
resultPlayMovie.isVisible = (data is Resource.Success) && !comingSoon
|
||||||
resultPlayMovie.isVisible = data is Resource.Success
|
|
||||||
resultPlaySeries.isVisible = false
|
resultPlaySeries.isVisible = false
|
||||||
resultEpisodesShow.isVisible = false
|
resultEpisodesShow.isVisible = false
|
||||||
|
|
||||||
|
@ -775,9 +775,9 @@ class ResultFragmentTv : Fragment() {
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
|
|
||||||
resultPlayMovie.isVisible = false
|
resultPlayMovie.isVisible = false
|
||||||
resultPlaySeries.isVisible = true
|
resultPlaySeries.isVisible = true && !comingSoon
|
||||||
resultEpisodes.isVisible = true
|
resultEpisodes.isVisible = true && !comingSoon
|
||||||
resultEpisodesShow.isVisible = true
|
resultEpisodesShow.isVisible = true && !comingSoon
|
||||||
|
|
||||||
// resultEpisodeLoading.isVisible = episodes is Resource.Loading
|
// resultEpisodeLoading.isVisible = episodes is Resource.Loading
|
||||||
if (episodes is Resource.Success) {
|
if (episodes is Resource.Success) {
|
||||||
|
@ -898,8 +898,12 @@ class ResultFragmentTv : Fragment() {
|
||||||
radius = 0,
|
radius = 0,
|
||||||
errorImageDrawable = error
|
errorImageDrawable = error
|
||||||
)
|
)
|
||||||
resultComingSoon.isVisible = d.comingSoon
|
comingSoon = d.comingSoon
|
||||||
|
resultTvComingSoon.isVisible = d.comingSoon
|
||||||
|
resultPlayMovie.isGone = d.comingSoon
|
||||||
|
resultPlaySeries.isGone = d.comingSoon
|
||||||
resultDataHolder.isGone = d.comingSoon
|
resultDataHolder.isGone = d.comingSoon
|
||||||
|
|
||||||
UIHelper.populateChips(resultTag, d.tags)
|
UIHelper.populateChips(resultTag, d.tags)
|
||||||
resultCastItems.isGone = d.actors.isNullOrEmpty()
|
resultCastItems.isGone = d.actors.isNullOrEmpty()
|
||||||
(resultCastItems.adapter as? ActorAdaptor)?.updateList(
|
(resultCastItems.adapter as? ActorAdaptor)?.updateList(
|
||||||
|
|
|
@ -604,6 +604,20 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
|
||||||
tools:listitem="@layout/cast_item"
|
tools:listitem="@layout/cast_item"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/result_tv_coming_soon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="50dp"
|
||||||
|
android:text="@string/coming_soon"
|
||||||
|
android:textColor="?attr/textColor"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/result_recommendations_holder"
|
android:id="@+id/result_recommendations_holder"
|
||||||
android:descendantFocusability="afterDescendants"
|
android:descendantFocusability="afterDescendants"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue