Hide Cast & Crew section when there are none
This commit is contained in:
parent
3d450ef203
commit
a91a8ba72f
2 changed files with 8 additions and 0 deletions
|
@ -55,6 +55,13 @@ class MediaInfoFragment : Fragment() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
viewModel.actors.observe(viewLifecycleOwner, { actors ->
|
||||||
|
when (actors.isNullOrEmpty()) {
|
||||||
|
false -> binding.actors.visibility = View.VISIBLE
|
||||||
|
true -> binding.actors.visibility = View.GONE
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
viewModel.navigateToPlayer.observe(viewLifecycleOwner, { mediaSource ->
|
viewModel.navigateToPlayer.observe(viewLifecycleOwner, { mediaSource ->
|
||||||
mediaSource.id?.let {
|
mediaSource.id?.let {
|
||||||
navigateToPlayerActivity(
|
navigateToPlayerActivity(
|
||||||
|
|
|
@ -348,6 +348,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/actors"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
Loading…
Reference in a new issue