aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-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
-rw-r--r--app/src/main/res/layout/item_layout.xml13
-rw-r--r--app/src/main/res/values/strings.xml16
4 files changed, 17 insertions, 16 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)
}
diff --git a/app/src/main/res/layout/item_layout.xml b/app/src/main/res/layout/item_layout.xml
index 32bea24..8d7a792 100644
--- a/app/src/main/res/layout/item_layout.xml
+++ b/app/src/main/res/layout/item_layout.xml
@@ -26,7 +26,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
- android:src="@mipmap/ic_launcher_round"
+ android:src="@mipmap/ic_launcher"
android:contentDescription="@string/rv_image" />
<TextView
@@ -56,6 +56,17 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_title"/>
+ <TextView
+ android:id="@+id/tv_score"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/very_dark_purple"
+ android:text="@string/rv_score"
+ android:textColor="@color/slightly_desaturated_magenta"
+ android:textSize="20sp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/tv_title"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 403a883..636de76 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -18,20 +18,6 @@
<string name="manga_image_content_description">Image of manga</string>
<string name="top_anime_page_label">Top Anime Page</string>
<string name="top_anime">Top Anime</string>
-
- <string-array name="manga_array">
- <item>Dragon Ball</item>
- <item>Naruto</item>
- <item>Fairy Tail</item>
- <item>Shokugeki no Souma</item>
- <item>Ajin</item>
- <item>Komi-san no Komyushu</item>
- <item>Hunter x Hunter</item>
- <item>Detective Conan</item>
- <item>Swortd Art Online</item>
- <item>Scumbag Loser</item>
- <item>Ana Satsujin</item>
- <item>Samurai Deeper Kyou</item>
- </string-array>
+ <string name="rv_score">00.00</string>
</resources> \ No newline at end of file