From 6caf50512e0d5ec54493037ad5662229d8836eca Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sun, 21 Feb 2021 18:07:27 +0100 Subject: Making activity_detail_top_manga.xml beautiful! --- .../aniki/topmanga/DetailTopMangaActivity.kt | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'app/src/main/java/xyz/adjutor/aniki') 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 2f0d2c3..9347f2c 100644 --- a/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt +++ b/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt @@ -6,24 +6,26 @@ import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions +import com.google.android.material.snackbar.Snackbar import xyz.adjutor.aniki.R class DetailTopMangaActivity : AppCompatActivity() { - private val currentMangaId = "themangaid" - private val currentMangaTitle = "themangatitle" - private val currentMangaRank = "themangarank" - private val currentMangaScore = "themangascore" - private val currentMangaImageUrl = "themangaimageurl" + + private val mangaId = "themangaid" + private val mangaTitle = "themangatitle" + private val mangaRank = "themangarank" + private val mangaScore = "themangascore" + private val mangaImageUrl = "themangaimageurl" override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_detail_top_manga) - val mangaId = intent.getStringExtra(currentMangaId) - val mangaTitle = intent.getStringExtra(currentMangaTitle) - val mangaRank = intent.getStringExtra(currentMangaRank) - val mangaScore = intent.getStringExtra(currentMangaScore) - val mangaImage = intent.getStringExtra(currentMangaImageUrl) + val mangaId = intent.getStringExtra(mangaId) + val mangaTitle = intent.getStringExtra(mangaTitle) + val mangaRank = intent.getStringExtra(mangaRank) + val mangaScore = intent.getStringExtra(mangaScore) + val mangaImage = intent.getStringExtra(mangaImageUrl) val tvId: TextView = findViewById(R.id.tv_detail_id) val tvTitle: TextView = findViewById(R.id.tv_detail_title) @@ -31,6 +33,11 @@ class DetailTopMangaActivity : AppCompatActivity() { val tvScore: TextView = findViewById(R.id.tv_detail_score) val ivImage: ImageView = findViewById(R.id.iv_detail_image) + //elements from Manga + val tvChapters: TextView = findViewById(R.id.tv_chapters) + val tvSynopsis: TextView = findViewById(R.id.tv_synopsis) + val tvBackground: TextView = findViewById(R.id.tv_background) + tvId.text = mangaId tvTitle.text = mangaTitle tvRank.text = mangaRank -- cgit v1.2.3