File tree Expand file tree Collapse file tree 3 files changed +48
-4
lines changed
app/src/main/java/es/cibernarium/jetpackcomposeapp Expand file tree Collapse file tree 3 files changed +48
-4
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import androidx.compose.ui.text.font.FontWeight
41
41
import androidx.compose.ui.tooling.preview.Preview
42
42
import androidx.compose.ui.unit.dp
43
43
import androidx.compose.ui.unit.sp
44
+ import es.cibernarium.jetpackcomposeapp.pantalles.PrimeraPantalla
44
45
import es.cibernarium.jetpackcomposeapp.ui.theme.JetpackComposeAppTheme
45
46
46
47
private val perfils: List <Perfil > = listOf (
@@ -76,7 +77,8 @@ class MainActivity : ComponentActivity() {
76
77
.padding(15 .dp)
77
78
.verticalScroll(scrollState)
78
79
) {
79
- Usuaris (perfils)
80
+ PrimeraPantalla ()
81
+ // Usuaris(perfils)
80
82
// Element(Perfil("Enric","Sòc un usuari molt actiu de la plataforma."))
81
83
}
82
84
}
@@ -97,13 +99,16 @@ class MainActivity : ComponentActivity() {
97
99
@Composable
98
100
fun Element (dades : Perfil ){
99
101
// Definim variable de control sobre l'estat de clickable
102
+ // var expanded = false
100
103
var expanded by remember{mutableStateOf(false )}
101
104
Row {
102
105
Avatar ()
103
106
Column (
104
- modifier = Modifier .padding(15 .dp).clickable {
105
- expanded = ! expanded
106
- }
107
+ modifier = Modifier
108
+ .padding(15 .dp)
109
+ .clickable {
110
+ expanded = ! expanded
111
+ }
107
112
) {
108
113
SalutacioPersonal (nom = dades.nom)
109
114
Description (
Original file line number Diff line number Diff line change
1
+ package es.cibernarium.jetpackcomposeapp.pantalles
2
+
3
+ import android.annotation.SuppressLint
4
+ import androidx.compose.foundation.layout.Column
5
+ import androidx.compose.material3.Button
6
+ import androidx.compose.material3.Scaffold
7
+ import androidx.compose.material3.Text
8
+ import androidx.compose.runtime.Composable
9
+
10
+ @SuppressLint(" UnusedMaterial3ScaffoldPaddingParameter" )
11
+ @Composable
12
+ fun PrimeraPantalla (){
13
+ Scaffold {
14
+ ContingutCos ()
15
+ }
16
+ }
17
+
18
+ @Composable
19
+ fun ContingutCos (){
20
+ Column () {
21
+ Text (" Intranet" )
22
+ Button (onClick = { /* TODO*/ }) {
23
+ Text (" Navega" )
24
+ }
25
+ }
26
+ }
27
+
28
+ @Composable
29
+ fun VistaPrevia (){
30
+ PrimeraPantalla ()
31
+ }
You can’t perform that action at this time.
0 commit comments