Modif Quote page

pull/38/head
kevin.modejar 2 months ago
parent a42951727e
commit 9d214cbe9d

@ -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){
fun InfoQuoteText(name : String, text : String){
Column{
Text(
text = name
)
Text(
text = text,
modifier = Modifier
.drawBehind {
drawRoundRect(
Color(255,255,255),
cornerRadius = CornerRadius(10.dp.toPx())
cornerRadius = CornerRadius(15.dp.toPx())
)
}
.padding(5.dp)
)
}
}

@ -4,4 +4,6 @@
<string name="movie">Film</string>
<string name="videoGame">Jeu Vidéo</string>
<string name="series">Série</string>
<string name="charac">Personnage</string>
<string name="source">Source</string>
</resources>

@ -3,4 +3,6 @@
<string name="movie">Movie</string>
<string name="videoGame">Video Game</string>
<string name="series">Series</string>
<string name="charac">Character</string>
<string name="source">Source</string>
</resources>
Loading…
Cancel
Save