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
|
animeRecently
|
||||||
)
|
)
|
||||||
animePopular.visibility = View.VISIBLE
|
animePopular.visibility = View.VISIBLE
|
||||||
binding.animePopular.startAnimation(setSlideUp())
|
animePopular.startAnimation(setSlideUp())
|
||||||
|
if (adaptor.itemCount == 0) {
|
||||||
|
animeRecentlyContainer.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
fun updateMovies(adaptor: MediaAdaptor) {
|
fun updateMovies(adaptor: MediaAdaptor) {
|
||||||
binding.apply{
|
binding.apply{
|
||||||
init(
|
init(
|
||||||
|
|
|
@ -178,6 +178,12 @@
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/animeRecentlyContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/animeRecently"
|
android:id="@+id/animeRecently"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -217,6 +223,7 @@
|
||||||
tools:orientation="horizontal" />
|
tools:orientation="horizontal" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/animeMovies"
|
android:id="@+id/animeMovies"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue