From 496eff5e9bf0380253594ddf37a5743f6d250562 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Sat, 20 Feb 2021 18:10:38 +0100 Subject: Intents now working for top mangas --- .../aniki/topmanga/DetailTopMangaActivity.kt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt (limited to 'app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt') diff --git a/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt b/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt new file mode 100644 index 0000000..61c5b14 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/topmanga/DetailTopMangaActivity.kt @@ -0,0 +1,36 @@ +package xyz.adjutor.aniki.topmanga + +import android.os.Bundle +import android.widget.Button +import android.widget.ImageView +import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity +import androidx.navigation.fragment.NavHostFragment.findNavController +import androidx.navigation.fragment.findNavController +import com.bumptech.glide.Glide +import xyz.adjutor.aniki.R + +class DetailTopMangaActivity : AppCompatActivity() { + + private val currentMangaTitle: String = "themangatitle" + val currentMangaRank: String = "themangarank" + val currentMangaScore: String = "themangascore" + val currentMangaImageUrl: String = "themangaimageurl" + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_detail_top_manga) + + val mangaTitle = intent.getStringExtra(currentMangaTitle) + val mangaRank = intent.getStringExtra(currentMangaRank) + val mangaScore = intent.getStringExtra(currentMangaScore) + + 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) + + tvTitle.text = mangaTitle + tvRank.text = mangaRank + tvScore.text = mangaScore + } +} \ No newline at end of file -- cgit v1.2.3