This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun AnImage(name: String,role:String) { | |
val image = painterResource(R.drawable.android_logo) | |
Column( | |
verticalArrangement = Arrangement.Center, | |
horizontalAlignment = Alignment.CenterHorizontally, | |
modifier = Modifier.background(Color.Black) | |
) { | |
Image( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spacer(modifier = Modifier.height(height = 15.dp)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun icon_card_2(text: String, imagevector: ImageVector){ | |
Row( modifier = Modifier.padding(top = 8.dp,bottom = 8.dp).fillMaxWidth(0.6f)) { | |
Icon( | |
imageVector = imagevector, | |
modifier = Modifier.size(size = 20.dp), | |
contentDescription = "Email Address", | |
tint = Color.Green | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun icon_column(){ | |
Column (horizontalAlignment=Alignment.CenterHorizontally,modifier = Modifier.wrapContentWidth()){ | |
Divider(color = Color.Gray , modifier = Modifier.fillMaxWidth()) | |
icon_card_2("+27 81 5316830", Icons.Filled.Phone) | |
Divider(color = Color.Gray , modifier = Modifier.fillMaxWidth()) | |
icon_card_2("@JustJessZA", Icons.Filled.Share) | |
Divider(color = Color.Gray , modifier = Modifier.fillMaxWidth()) | |
icon_card_2("jess1998mat@gmail.com",Icons.Filled.Email) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Surface( | |
modifier = Modifier.fillMaxSize(), | |
color = MaterialTheme.colors.background | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Annotation to use experimental API for Foundation layout | |
@OptIn(ExperimentalFoundationApi::class) | |
@Composable | |
fun GridExample() { | |
// Creating a LazyVerticalStaggeredGrid with fixed 3 columns | |
LazyVerticalStaggeredGrid( | |
columns = StaggeredGridCells.Fixed(3), | |
modifier = Modifier.padding(8.dp) // Adding padding around the entire grid | |
) { | |
// Iterating over items returned by getItems() function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Annotation to use experimental API for Material3 components | |
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun ChipItem(text: String, selected: MutableState<String>) { | |
// Defining a FilterChip composable | |
FilterChip( | |
modifier = Modifier.padding(end = 16.dp), // Adding padding to the end of the chip | |
selected = selected.value === text, // Chip is selected if its text matches the selected value | |
onClick = { selected.value = text }, // On click, set the chip's text as the selected value | |
label = { Text(text) } // Displaying the given text on the chip |