mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-30 12:31:02 +00:00
feat(Media List view): switch between grid and list view
This commit is contained in:
@@ -232,9 +232,9 @@ class HomeFragment : Fragment() {
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
more.setOnClickListener { _ ->
|
||||
more.setOnClickListener { i ->
|
||||
ContextCompat.startActivity(
|
||||
requireActivity(), Intent(requireActivity(), MediaListViewActivity::class.java)
|
||||
i.context, Intent(i.context, MediaListViewActivity::class.java)
|
||||
.putExtra("title", string)
|
||||
.putExtra("media", it),
|
||||
null
|
||||
|
||||
@@ -221,7 +221,6 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
||||
media
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun updateTopRated(adaptor: MediaAdaptor, media: MutableList<Media>) {
|
||||
@@ -254,7 +253,15 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
||||
}
|
||||
}
|
||||
|
||||
fun init(adaptor: MediaAdaptor, recyclerView: RecyclerView, progress: View, title: View , more: View , string: String, media : MutableList<Media>) {
|
||||
fun init(
|
||||
adaptor: MediaAdaptor,
|
||||
recyclerView: RecyclerView,
|
||||
progress: View,
|
||||
title: View ,
|
||||
more: View ,
|
||||
string: String,
|
||||
media : MutableList<Media>
|
||||
) {
|
||||
progress.visibility = View.GONE
|
||||
recyclerView.adapter = adaptor
|
||||
recyclerView.layoutManager =
|
||||
|
||||
Reference in New Issue
Block a user