fix: hide recent if its empty

This commit is contained in:
aayush262 2024-03-31 16:44:27 +05:30
parent 76e11e5a3e
commit 95b2939532
2 changed files with 46 additions and 35 deletions

View file

@ -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(

View file

@ -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"