diff options
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/manga/topmanga')
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/manga/topmanga/DetailTopMangaActivity.kt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/manga/topmanga/DetailTopMangaActivity.kt b/app/src/main/java/xyz/adjutor/aniki/manga/topmanga/DetailTopMangaActivity.kt index fc10e89..6d89437 100644 --- a/app/src/main/java/xyz/adjutor/aniki/manga/topmanga/DetailTopMangaActivity.kt +++ b/app/src/main/java/xyz/adjutor/aniki/manga/topmanga/DetailTopMangaActivity.kt @@ -29,12 +29,14 @@ class DetailTopMangaActivity : AppCompatActivity() { .setLenient() .create() - private val intentMangaId = "themangaid" + //used in the list private val intentMangaTitle = "themangatitle" private val intentMangaRank = "themangarank" private val intentMangaScore = "themangascore" private val intentMangaImageUrl = "themangaimageurl" + //only used for the detail + private val intentMangaId = "themangaid" private val intentMangaVolumes = "themangavolumes" private val intentMangaStartDate = "themangastartdate" private val intentMangaEndDate = "themangaenddate" @@ -46,29 +48,28 @@ class DetailTopMangaActivity : AppCompatActivity() { sharedPreferences = this.getSharedPreferences("sp_manga", Context.MODE_PRIVATE) - val mangaId = intent.getStringExtra(intentMangaId) val mangaTitle = intent.getStringExtra(intentMangaTitle) val mangaRank = intent.getStringExtra(intentMangaRank) val mangaScore = intent.getStringExtra(intentMangaScore) val mangaImageUrl = intent.getStringExtra(intentMangaImageUrl) + val mangaId = intent.getStringExtra(intentMangaId) val mangaVolumes = intent.getStringExtra(intentMangaVolumes) val mangaStartDate = intent.getStringExtra(intentMangaStartDate) val mangaEndDate = intent.getStringExtra(intentMangaEndDate) val mangaUrl = intent.getStringExtra(intentMangaUrl) - val tvId: TextView = findViewById(R.id.tv_detail_id) val tvTitle: TextView = findViewById(R.id.tv_detail_title) val tvRank: TextView = findViewById(R.id.tv_detail_rank) val tvScore: TextView = findViewById(R.id.tv_detail_score) val ivImage: ImageView = findViewById(R.id.iv_detail_image) + val tvId: TextView = findViewById(R.id.tv_detail_id) val tvVolumes: TextView = findViewById(R.id.tv_volumes) val tvStartDate: TextView = findViewById(R.id.tv_start_date) val tvEndDate: TextView = findViewById(R.id.tv_end_date) val tvUrl: TextView = findViewById(R.id.tv_url) - tvId.text = mangaId tvTitle.text = mangaTitle tvRank.text = mangaRank tvScore.text = mangaScore @@ -78,6 +79,8 @@ class DetailTopMangaActivity : AppCompatActivity() { .apply(RequestOptions().override(400)) .into(ivImage) + tvId.text = mangaId + //using null as a string because it has been converted to a string before tvVolumes.text = if (mangaVolumes != "null") { mangaVolumes |