From 13fdfd28b10cdac6e5b901d3947ba02fa744df4b Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Fri, 19 Feb 2021 20:33:21 +0100 Subject: Adding scores to the recyclerview layout. --- app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt') diff --git a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt index a036c15..68a2c7b 100644 --- a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt +++ b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt @@ -24,6 +24,7 @@ class TopAnimeAdapter(val animeList: List) : class AnimeViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { val animeTitle: TextView = itemView.findViewById(R.id.tv_title) val animeRank: TextView = itemView.findViewById(R.id.tv_rank) + val animeScore: TextView = itemView.findViewById(R.id.tv_score) val animeImage: ImageView = itemView.findViewById(R.id.iv_image) } @@ -46,6 +47,7 @@ class TopAnimeAdapter(val animeList: List) : val currentAnime: TopAnime = animeList[position] holder.animeTitle.text = currentAnime.title holder.animeRank.text = currentAnime.rank.toString() + holder.animeScore.text = currentAnime.score.toString() DownloadImageFromInternet(holder.animeImage).execute(currentAnime.image_url) } -- cgit v1.2.3