Skip to content

Commit ac5d5b3

Browse files
author
Section One
committed
Codi JC14 - Emprant temes de Material Design en Jetpack Compose
1 parent 30d69d8 commit ac5d5b3

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,24 @@ class MainActivity : ComponentActivity() {
6161

6262
@Composable
6363
private fun SalutacioPersonal(nom: String){
64-
Text(
65-
text = "Hola $nom!",
66-
color = Color.Red,
67-
fontSize = 18.sp,
68-
fontStyle = FontStyle.Italic,
69-
fontWeight = FontWeight.Bold,
70-
fontFamily = FontFamily.Serif
71-
)
64+
MaterialTheme() {
65+
Text(
66+
text = "Hola $nom!",
67+
color = Color.Red,
68+
fontSize = 18.sp,
69+
fontStyle = FontStyle.Italic,
70+
fontWeight = FontWeight.Bold,
71+
fontFamily = Serif,
72+
style = MaterialTheme.typography.titleMedium
73+
)
74+
}
7275
}
7376
@Composable
7477
private fun Avatar(){
7578
Image(
7679
painter = painterResource(R.drawable.qx7jysym_400x400),
7780
contentDescription = "Logo Refus",
78-
modifier = Modifier.height(100.dp).clip(CircleShape).background(Color.Blue)
81+
modifier = Modifier.height(100.dp)
7982
)
8083
}
8184
@Composable

0 commit comments

Comments
 (0)