aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/xyz/adjutor
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-02-19 20:33:21 +0100
committerClyhtsuriva <aimeric@adjutor.xyz>2021-02-19 20:33:21 +0100
commit13fdfd28b10cdac6e5b901d3947ba02fa744df4b (patch)
treeae8a23f78c410a6afe9d4d619069d9de103197c7 /app/src/main/java/xyz/adjutor
parent485d3ca989bd4cce1788eae17bcc7587d5ef2c90 (diff)
Adding scores to the recyclerview layout.
Diffstat (limited to 'app/src/main/java/xyz/adjutor')
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimeAdapter.kt2
-rw-r--r--app/src/main/java/xyz/adjutor/aniki/topmanga/TopMangaAdapter.kt2
2 files changed, 4 insertions, 0 deletions
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<TopAnime>) :
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<TopAnime>) :
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)
}
diff --git a/app/src/main/java/xyz/adjutor/aniki/topmanga/TopMangaAdapter.kt b/app/src/main/java/xyz/adjutor/aniki/topmanga/TopMangaAdapter.kt
index 18fd7a0..22872b2 100644
--- a/app/src/main/java/xyz/adjutor/aniki/topmanga/TopMangaAdapter.kt
+++ b/app/src/main/java/xyz/adjutor/aniki/topmanga/TopMangaAdapter.kt
@@ -22,6 +22,7 @@ class TopMangaAdapter(val mangaList: List<TopManga>) :
class MangaViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val mangaTitle: TextView = itemView.findViewById(R.id.tv_title)
val mangaRank: TextView = itemView.findViewById(R.id.tv_rank)
+ val mangaScore: TextView = itemView.findViewById(R.id.tv_score)
val mangaImage: ImageView = itemView.findViewById(R.id.iv_image)
}
@@ -44,6 +45,7 @@ class TopMangaAdapter(val mangaList: List<TopManga>) :
val currentManga: TopManga = mangaList[position]
holder.mangaTitle.text = currentManga.title
holder.mangaRank.text = currentManga.rank.toString()
+ holder.mangaScore.text = currentManga.score.toString()
DownloadImageFromInternet(holder.mangaImage).execute(currentManga.image_url)
}