diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-20 18:15:47 +0100 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-20 18:15:47 +0100 |
commit | 3703ade7bae26dd223e71aa098f8ea0d50ca2a00 (patch) | |
tree | 85334e842b256b53953bbb5d721bbc8ae2d21988 /app/src | |
parent | 496eff5e9bf0380253594ddf37a5743f6d250562 (diff) |
Added image support
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt | 8 |
1 files changed, 8 insertions, 0 deletions
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 |