File tree Expand file tree Collapse file tree 1 file changed +37
-18
lines changed
app/src/main/java/es/cibernarium/jetpackcomposeapp Expand file tree Collapse file tree 1 file changed +37
-18
lines changed Original file line number Diff line number Diff line change @@ -48,39 +48,58 @@ class MainActivity : ComponentActivity() {
48
48
) {
49
49
// Tot el que posem aqui serà la part visible de la nostre Aplicació
50
50
Column (
51
- modifier = Modifier .padding(15 .dp).fillMaxWidth(),
52
- horizontalAlignment = Alignment .CenterHorizontally
51
+ modifier = Modifier .padding(15 .dp)
53
52
) {
54
-
55
- Avatar ()
56
- SalutacioPersonal (nom = " Francesc" )
57
- Description ()
53
+ Element ()
54
+ Element ()
55
+ Element ()
56
+ Element ()
57
+ Element ()
58
+ Element ()
59
+ Element ()
60
+ Element ()
61
+ Element ()
62
+ Element ()
63
+ Element ()
64
+ Element ()
58
65
}
59
66
}
60
67
}
61
68
}
62
69
}
63
70
64
71
@Composable
65
- private fun SalutacioPersonal (nom : String ){
66
- MaterialTheme () {
67
- Text (
68
- text = " Hola $nom !" ,
69
- color = Color .Red ,
70
- fontSize = 18 .sp,
71
- fontStyle = FontStyle .Italic ,
72
- fontWeight = FontWeight .Bold ,
73
- fontFamily = Serif ,
74
- style = MaterialTheme .typography.titleMedium
75
- )
72
+ private fun Element (){
73
+ Row {
74
+ Avatar ()
75
+ Column (
76
+ modifier = Modifier .padding(15 .dp)
77
+ ) {
78
+ SalutacioPersonal (nom = " Francesc" )
79
+ Description ()
80
+ }
76
81
}
77
82
}
78
83
@Composable
84
+ private fun SalutacioPersonal (nom : String ){
85
+ Text (
86
+ text = " Hola $nom !" ,
87
+ color = Color .Red ,
88
+ fontSize = 18 .sp,
89
+ fontStyle = FontStyle .Italic ,
90
+ fontWeight = FontWeight .Bold ,
91
+ fontFamily = FontFamily .Serif
92
+ )
93
+ }
94
+ @Composable
79
95
private fun Avatar (){
80
96
Image (
81
97
painter = painterResource(R .drawable.qx7jysym_400x400),
82
98
contentDescription = " Logo Refus" ,
83
- modifier = Modifier .height(100 .dp)
99
+ modifier = Modifier
100
+ .height(100 .dp)
101
+ .clip(CircleShape )
102
+ .background(Color .Blue )
84
103
)
85
104
}
86
105
@Composable
You can’t perform that action at this time.
0 commit comments