Modif Quote page

pull/38/head
kevin.modejar 2 months ago
parent 73ec171f2e
commit a42951727e

@ -1,20 +1,25 @@
package com.example.what_the_fantasy.ui.screens package com.example.what_the_fantasy.ui.screens
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier 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 import com.example.what_the_fantasy.data.model.Quote
@Composable @Composable
fun QuotePage(quote : Quote, modifier: Modifier) { fun QuotePage(quote : Quote, modifier: Modifier) {
Column(modifier = modifier) { Column(modifier = modifier.background(Color.Black)) {
Text( Text(
text = '"'+quote.content+'"' text = '"'+quote.content+'"'
) )
Text( InfoQuoteText(
text = "-" + quote.character text = quote.character
) )
Text( Text(
text = "-" + quote.source 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())
)
}
)
} }
Loading…
Cancel
Save