Sellami Nabil 🇲🇦
@Sellami_nabil
Followers
837
Following
12K
Media
541
Statuses
3K
Building sleek UIs with #JetpackCompose | Sharing daily Kotlin snippets & UI Challenges 🚀
Joined January 2016
The rock
0
0
2
Coding time again. Keep completing small tasks, step by step
1
0
3
#17: Surface - Material Container Surface is a fundamental Material Design container. It provides elevation, shapes, and clipping. ```kotlin @Composable fun CardLikeSurface() { Surface( modifier = Modifier.padding(16.dp), elevation = 4.dp, shape =
0
0
3
#16: Basic Alignment in Row & Column Control child positioning within Row and Column using the horizontalAlignment and verticalArrangement parameters. ```kotlin @Composable fun CenteredColumn() { Column( horizontalAlignment = Alignment.CenterHorizontally,
0
0
3
#15: Spacer - Adding Empty Space Use Spacer to push composables apart within a Row or Column by adding flexible empty space. ```kotlin @Composable fun SpacedRow() { Row { Text("Start") Spacer(modifier = Modifier.weight(1f)) // Takes all available space
0
0
0
#14: LazyColumn - Efficient Lists LazyColumn renders only the visible items in a scrollable column, making it efficient for long lists. ```kotlin @Composable fun NumberList() { LazyColumn { items(100) { index -> // Generates 100 items Text(
0
0
0
#13: Icons - Material Icons Compose includes the Material Icons library. Use the Icon composable to display them. ```kotlin @Composable fun IconExample() { Icon( imageVector = Icons.Filled.Favorite, contentDescription = "Favorite icon", tint =
0
0
0
#12: Buttons - Click Actions Button provides a clickable Material Design button. Handle clicks with the onClick lambda. ```kotlin @Composable fun ActionButton() { Button( onClick = { /* Perform an action here */ println("Button clicked!") },
0
0
0
#11: TextField - Basic Input TextField is the primary widget for user text input. It requires state to hold its value. ```kotlin @Composable fun SimpleTextField() { val textState = remember { mutableStateOf("") } TextField( value = textState.value,
0
0
0