Skip to content

Instantly share code, notes, and snippets.

@Levi-Moreira
Last active February 12, 2024 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Levi-Moreira/805789a3a8c9bff10dae2906db339ba3 to your computer and use it in GitHub Desktop.
Save Levi-Moreira/805789a3a8c9bff10dae2906db339ba3 to your computer and use it in GitHub Desktop.
Initial Code Representing a Screen Without Nested Scrolling
val AppBarHeight = 56.dp
val Purple40 = Color(0xFF6650a4)
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
Box {
LazyColumn(contentPadding = PaddingValues(top = AppBarHeight)) {
items(Contents) {
ListItem(item = it)
}
}
TopAppBar(
title = { Text(text = "Jetpack Compose") },
colors = TopAppBarDefaults.topAppBarColors(
containerColor = Purple40,
titleContentColor = Color.White
)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment