diff options
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt')
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt b/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt index ee8a510..6606b6c 100644 --- a/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt +++ b/app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt @@ -34,17 +34,19 @@ class TopMangaPage : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + //button to return to the home page view.findViewById<Button>(R.id.button_home).setOnClickListener { findNavController().navigate(R.id.action_TopMangaPage_to_HomePage) } } + //display the recyclerview fun showList(view: View, mangaList: List<TopManga> ){ val recyclerView: RecyclerView = view.findViewById(R.id.recycler_view) recyclerView.setHasFixedSize(true) recyclerView.layoutManager = LinearLayoutManager(view.context) - recyclerView.adapter = MangaAdapter(mangaList) + recyclerView.adapter = TopMangaAdapter(mangaList) } fun makeApiCall(view: View, BASE_URL: String) { |