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 ++- .../main/res/layout/activity_detail_top_manga.xml | 205 +++++++++++++++++++-- app/src/main/res/values/strings.xml | 24 ++- 3 files changed, 221 insertions(+), 35 deletions(-) (limited to 'app/src/main') 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 diff --git a/app/src/main/res/layout/activity_detail_top_manga.xml b/app/src/main/res/layout/activity_detail_top_manga.xml index 42018ef..b9a5dd7 100644 --- a/app/src/main/res/layout/activity_detail_top_manga.xml +++ b/app/src/main/res/layout/activity_detail_top_manga.xml @@ -6,7 +6,24 @@ android:layout_height="match_parent" tools:context=".topmanga.DetailTopMangaActivity" android:background="@color/very_dark_purple"> + + + + app:layout_constraintTop_toTopOf="parent" /> + + android:textColor="@color/slightly_desaturated_magenta" + android:textSize="20sp" + app:layout_constraintBottom_toTopOf="@id/tv_detail_title" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_detail_title" /> + + + + + + + + + + + + + + + + + + + + + + + + + app:layout_constraintTop_toTopOf="parent"/> + + + + + + + + + - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 03d4a0e..100335d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -3,19 +3,31 @@ Settings Top Manga + Top Anime Home + Home Page - News Page - Article Page Top Manga Page + Top Anime Page + + 000000 Title 0 image - Image of manga - Top Anime Page - Top Anime 00.00 - 000000 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + "MAL ID : " + "Rank : " + "Score : " + 000 + "Volumes : " + "Chapters: " + 0000 + "Start date : " + "End date : " + Jan 0000 + Dec 0000 + Cras molestie turpis at lorem rutrum vehicula. Fusce rutrum, enim sed laoreet semper, tortor quam semper dui, id bibendum lacus quam vitae neque. + \ No newline at end of file -- cgit v1.2.3