feat: adult only media option
This commit is contained in:
parent
c0bccc027f
commit
99b3bbaaad
13 changed files with 137 additions and 135 deletions
|
@ -182,86 +182,72 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
|||
}
|
||||
|
||||
fun updateTrendingManga(adaptor: MediaAdaptor) {
|
||||
binding.mangaTrendingMangaProgressBar.visibility = View.GONE
|
||||
binding.mangaTrendingMangaRecyclerView.adapter = adaptor
|
||||
binding.mangaTrendingMangaRecyclerView.layoutManager =
|
||||
LinearLayoutManager(
|
||||
binding.mangaTrendingMangaRecyclerView.context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
binding.apply {
|
||||
init(
|
||||
adaptor,
|
||||
mangaTrendingMangaRecyclerView,
|
||||
mangaTrendingMangaProgressBar,
|
||||
mangaTrendingManga
|
||||
)
|
||||
binding.mangaTrendingMangaRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
binding.mangaTrendingManga.visibility = View.VISIBLE
|
||||
binding.mangaTrendingManga.startAnimation(setSlideUp())
|
||||
binding.mangaTrendingMangaRecyclerView.layoutAnimation =
|
||||
LayoutAnimationController(setSlideIn(), 0.25f)
|
||||
}
|
||||
}
|
||||
fun updateTrendingManhwa(adaptor: MediaAdaptor) {
|
||||
binding.mangaTrendingManhwaProgressBar.visibility = View.GONE
|
||||
binding.mangaTrendingManhwaRecyclerView.adapter = adaptor
|
||||
binding.mangaTrendingManhwaRecyclerView.layoutManager =
|
||||
LinearLayoutManager(
|
||||
binding.mangaNovelRecyclerView.context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
binding.apply {
|
||||
init(
|
||||
adaptor,
|
||||
mangaTrendingManhwaRecyclerView,
|
||||
mangaTrendingManhwaProgressBar,
|
||||
mangaTrendingManhwa
|
||||
)
|
||||
binding.mangaTrendingManhwaRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
binding.mangaTrendingManhwa.visibility = View.VISIBLE
|
||||
binding.mangaTrendingManhwa.startAnimation(setSlideUp())
|
||||
binding.mangaTrendingManhwaRecyclerView.layoutAnimation =
|
||||
LayoutAnimationController(setSlideIn(), 0.25f)
|
||||
}
|
||||
fun updateTopRated(adaptor: MediaAdaptor) {
|
||||
binding.mangaTopRatedProgressBar.visibility = View.GONE
|
||||
binding.mangaTopRatedRecyclerView.adapter = adaptor
|
||||
binding.mangaTopRatedRecyclerView.layoutManager =
|
||||
LinearLayoutManager(
|
||||
binding.mangaTopRatedRecyclerView.context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
binding.mangaTopRatedRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
binding.mangaTopRated.visibility = View.VISIBLE
|
||||
binding.mangaTopRated.startAnimation(setSlideUp())
|
||||
binding.mangaTopRatedRecyclerView.layoutAnimation =
|
||||
LayoutAnimationController(setSlideIn(), 0.25f)
|
||||
}
|
||||
fun updateMostFav(adaptor: MediaAdaptor) {
|
||||
binding.mangaMostFavProgressBar.visibility = View.GONE
|
||||
binding.mangaMostFavRecyclerView.adapter = adaptor
|
||||
binding.mangaMostFavRecyclerView.layoutManager =
|
||||
LinearLayoutManager(
|
||||
binding.mangaMostFavRecyclerView.context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
binding.mangaMostFavRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
binding.mangaMostFav.visibility = View.VISIBLE
|
||||
binding.mangaMostFav.startAnimation(setSlideUp())
|
||||
binding.mangaMostFavRecyclerView.layoutAnimation =
|
||||
LayoutAnimationController(setSlideIn(), 0.25f)
|
||||
}
|
||||
}
|
||||
fun updateNovel(adaptor: MediaAdaptor) {
|
||||
binding.mangaNovelProgressBar.visibility = View.GONE
|
||||
binding.mangaNovelRecyclerView.adapter = adaptor
|
||||
binding.mangaNovelRecyclerView.layoutManager =
|
||||
binding.apply {
|
||||
init(
|
||||
adaptor,
|
||||
mangaNovelRecyclerView,
|
||||
mangaNovelProgressBar,
|
||||
mangaNovel
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
fun updateTopRated(adaptor: MediaAdaptor) {
|
||||
binding.apply {
|
||||
init(
|
||||
adaptor,
|
||||
mangaTopRatedRecyclerView,
|
||||
mangaTopRatedProgressBar,
|
||||
mangaTopRated
|
||||
)
|
||||
}
|
||||
}
|
||||
fun updateMostFav(adaptor: MediaAdaptor) {
|
||||
binding.apply {
|
||||
init(
|
||||
adaptor,
|
||||
mangaMostFavRecyclerView,
|
||||
mangaMostFavProgressBar,
|
||||
mangaMostFav
|
||||
)
|
||||
mangaPopular.visibility = View.VISIBLE
|
||||
mangaPopular.startAnimation(setSlideUp())
|
||||
}
|
||||
}
|
||||
fun init(adaptor: MediaAdaptor,recyclerView: RecyclerView, progress: View, title: View){
|
||||
progress.visibility = View.GONE
|
||||
recyclerView.adapter = adaptor
|
||||
recyclerView.layoutManager =
|
||||
LinearLayoutManager(
|
||||
binding.mangaNovelRecyclerView.context,
|
||||
recyclerView.context,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
binding.mangaNovelRecyclerView.visibility = View.VISIBLE
|
||||
|
||||
binding.mangaNovel.visibility = View.VISIBLE
|
||||
binding.mangaNovel.startAnimation(setSlideUp())
|
||||
binding.mangaNovelRecyclerView.layoutAnimation =
|
||||
recyclerView.visibility = View.VISIBLE
|
||||
title.visibility = View.VISIBLE
|
||||
title.startAnimation(setSlideUp())
|
||||
recyclerView.layoutAnimation =
|
||||
LayoutAnimationController(setSlideIn(), 0.25f)
|
||||
binding.mangaPopular.visibility = View.VISIBLE
|
||||
binding.mangaPopular.startAnimation(setSlideUp())
|
||||
}
|
||||
|
||||
fun updateAvatar() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue