From 9d214cbe9d7de33f5332c696e8d1184089f570e7 Mon Sep 17 00:00:00 2001 From: "kevin.modejar" Date: Fri, 21 Feb 2025 13:49:04 +0100 Subject: [PATCH] Modif Quote page --- .../what_the_fantasy/ui/screens/QuotePage.kt | 48 ++++++++++++------- .../app/src/main/res/values-fr/strings.xml | 2 + .../app/src/main/res/values/strings.xml | 2 + 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt index d9471ee..e673348 100644 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt +++ b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/screens/QuotePage.kt @@ -1,7 +1,8 @@ package com.example.what_the_fantasy.ui.screens -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -13,16 +14,24 @@ import com.example.what_the_fantasy.data.model.Quote @Composable fun QuotePage(quote : Quote, modifier: Modifier) { - Column(modifier = modifier.background(Color.Black)) { + Column(modifier = modifier.padding(10.dp).drawBehind { + drawRoundRect( + Color(70,190,115), + cornerRadius = CornerRadius(10.dp.toPx()) + ) + }.size(500.dp, 600.dp)) + { Text( text = '"'+quote.content+'"' ) InfoQuoteText( - text = quote.character + name = "@string/source", + text = quote.source ) - Text( - text = "-" + quote.source + InfoQuoteText( + name = "@string/charac", + text = quote.character ) Text( text = "like : " + quote.likes.toString() @@ -32,15 +41,22 @@ fun QuotePage(quote : Quote, modifier: Modifier) { } @Composable -fun InfoQuoteText(text : String){ - Text( - text = text, - modifier = Modifier - .drawBehind { - drawRoundRect( - Color(255,255,255), - cornerRadius = CornerRadius(10.dp.toPx()) - ) - } - ) +fun InfoQuoteText(name : String, text : String){ + Column{ + Text( + text = name + ) + + Text( + text = text, + modifier = Modifier + .drawBehind { + drawRoundRect( + Color(255,255,255), + cornerRadius = CornerRadius(15.dp.toPx()) + ) + } + .padding(5.dp) + ) + } } \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/res/values-fr/strings.xml b/What_The_Fantasy/app/src/main/res/values-fr/strings.xml index cfb65f0..09b94f4 100644 --- a/What_The_Fantasy/app/src/main/res/values-fr/strings.xml +++ b/What_The_Fantasy/app/src/main/res/values-fr/strings.xml @@ -4,4 +4,6 @@ Film Jeu Vidéo Série + Personnage + Source \ No newline at end of file diff --git a/What_The_Fantasy/app/src/main/res/values/strings.xml b/What_The_Fantasy/app/src/main/res/values/strings.xml index 75ba845..784f992 100644 --- a/What_The_Fantasy/app/src/main/res/values/strings.xml +++ b/What_The_Fantasy/app/src/main/res/values/strings.xml @@ -3,4 +3,6 @@ Movie Video Game Series + Character + Source \ No newline at end of file