début quote little

pull/45/head
Maxime ROCHER 2 months ago
parent c8f704627b
commit c35948e2e6

@ -61,6 +61,7 @@ dependencies {
implementation(libs.androidx.material3)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.navigation.common.android)
implementation(libs.engage.core)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

@ -158,4 +158,3 @@ fun ButtonIconPainterInt(img : Painter, name : String, nav : (Int)->Unit,index:
)
}
}

@ -0,0 +1,59 @@
package com.example.what_the_fantasy.ui.components
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
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 QuoteLittle(quote: Quote, modifier: Modifier) {
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(
name = "@string/source",
text = quote.source
)
InfoQuoteText(
name = "@string/charac",
text = quote.character
)
}
}
@Composable
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)
)
}
}

@ -13,6 +13,7 @@ activityCompose = "1.8.0"
composeBom = "2024.04.01"
navigationCompose = "2.8.6"
navigationCommonAndroid = "2.9.0-alpha05"
engageCore = "1.5.6"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@ -34,6 +35,7 @@ androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
androidx-navigation-common-android = { group = "androidx.navigation", name = "navigation-common-android", version.ref = "navigationCommonAndroid" }
engage-core = { group = "com.google.android.engage", name = "engage-core", version.ref = "engageCore" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

Loading…
Cancel
Save