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 8e16e1c..d9471ee 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,20 +1,25 @@ package com.example.what_the_fantasy.ui.screens +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.drawBehind +import androidx.compose.ui.geometry.CornerRadius +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp import com.example.what_the_fantasy.data.model.Quote @Composable fun QuotePage(quote : Quote, modifier: Modifier) { - Column(modifier = modifier) { + Column(modifier = modifier.background(Color.Black)) { Text( text = '"'+quote.content+'"' ) - Text( - text = "-" + quote.character + InfoQuoteText( + text = quote.character ) Text( text = "-" + quote.source @@ -24,4 +29,18 @@ 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()) + ) + } + ) } \ No newline at end of file