Skip to content

Commit ddee103

Browse files
author
Section One
committed
Codi JC21 - Animacions limitant lineas a mostrar en Jetpack Compose
1 parent 7d2e048 commit ddee103

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/es/cibernarium/jetpackcomposeapp/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class MainActivity : ComponentActivity() {
9797
modifier = Modifier.padding(15.dp)
9898
) {
9999
SalutacioPersonal(nom = dades.nom)
100-
Description(description = dades.description)
100+
Description(description = dades.description, linies = 1)
101101
}
102102
}
103103
}
@@ -124,6 +124,6 @@ class MainActivity : ComponentActivity() {
124124
)
125125
}
126126
@Composable
127-
fun Description(description: String){
128-
Text(text = description)
127+
fun Description(description: String,linies: Int = Int.MAX_VALUE){
128+
Text(text = description, maxLines = linies)
129129
}

0 commit comments

Comments
 (0)