fix: hide recent if its empty
This commit is contained in:
parent
76e11e5a3e
commit
95b2939532
2 changed files with 46 additions and 35 deletions
|
@ -203,9 +203,13 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
|
|||
animeRecently
|
||||
)
|
||||
animePopular.visibility = View.VISIBLE
|
||||
binding.animePopular.startAnimation(setSlideUp())
|
||||
animePopular.startAnimation(setSlideUp())
|
||||
if (adaptor.itemCount == 0) {
|
||||
animeRecentlyContainer.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
fun updateMovies(adaptor: MediaAdaptor) {
|
||||
binding.apply{
|
||||
init(
|
||||
|
|
|
@ -178,6 +178,12 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/animeRecentlyContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animeRecently"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -217,6 +223,7 @@
|
|||
tools:orientation="horizontal" />
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animeMovies"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue