|
|
@ -1,7 +1,8 @@
|
|
|
|
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.foundation.layout.padding
|
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.size
|
|
|
|
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
|
|
|
@ -13,16 +14,24 @@ 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.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(
|
|
|
|
text = '"'+quote.content+'"'
|
|
|
|
text = '"'+quote.content+'"'
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
InfoQuoteText(
|
|
|
|
InfoQuoteText(
|
|
|
|
text = quote.character
|
|
|
|
name = "@string/source",
|
|
|
|
|
|
|
|
text = quote.source
|
|
|
|
)
|
|
|
|
)
|
|
|
|
Text(
|
|
|
|
InfoQuoteText(
|
|
|
|
text = "-" + quote.source
|
|
|
|
name = "@string/charac",
|
|
|
|
|
|
|
|
text = quote.character
|
|
|
|
)
|
|
|
|
)
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
text = "like : " + quote.likes.toString()
|
|
|
|
text = "like : " + quote.likes.toString()
|
|
|
@ -32,15 +41,22 @@ fun QuotePage(quote : Quote, modifier: Modifier) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
fun InfoQuoteText(text : String){
|
|
|
|
fun InfoQuoteText(name : String, text : String){
|
|
|
|
|
|
|
|
Column{
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
text = name
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
text = text,
|
|
|
|
text = text,
|
|
|
|
modifier = Modifier
|
|
|
|
modifier = Modifier
|
|
|
|
.drawBehind {
|
|
|
|
.drawBehind {
|
|
|
|
drawRoundRect(
|
|
|
|
drawRoundRect(
|
|
|
|
Color(255,255,255),
|
|
|
|
Color(255,255,255),
|
|
|
|
cornerRadius = CornerRadius(10.dp.toPx())
|
|
|
|
cornerRadius = CornerRadius(15.dp.toPx())
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.padding(5.dp)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|