From 3703ade7bae26dd223e71aa098f8ea0d50ca2a00 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sat, 20 Feb 2021 18:15:47 +0100 Subject: Added image support --- .../java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app') diff --git a/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt b/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt index 61c5b14..b01e3f3 100644 --- a/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt +++ b/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt @@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.navigation.fragment.NavHostFragment.findNavController import androidx.navigation.fragment.findNavController import com.bumptech.glide.Glide +import com.bumptech.glide.request.RequestOptions import xyz.adjutor.aniki.R class DetailTopMangaActivity : AppCompatActivity() { @@ -24,13 +25,20 @@ class DetailTopMangaActivity : AppCompatActivity() { val mangaTitle = intent.getStringExtra(currentMangaTitle) val mangaRank = intent.getStringExtra(currentMangaRank) val mangaScore = intent.getStringExtra(currentMangaScore) + val mangaImage = intent.getStringExtra(currentMangaImageUrl) 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) tvTitle.text = mangaTitle tvRank.text = mangaRank tvScore.text = mangaScore + Glide + .with(this) + .load(mangaImage) + .apply(RequestOptions().override(400)) + .into(ivImage) } } \ No newline at end of file -- cgit v1.2.3