-
-
Save KatieBarnett/35af5b28f688c8a23e8ce95595f46915 to your computer and use it in GitHub Desktop.
Non-collapsable LargeTopAppBar
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
val viewModel: MainViewModel = hiltViewModel() | |
val items: List<Int> by viewModel.items.collectAsState(initial = emptyList()) | |
Scaffold( | |
topBar = { | |
LargeTopAppBar( | |
title = { Text(text = stringResource(id = R.string.title)) }, | |
navigationIcon = { NavigationIcon(navController = navController)}, | |
actions = { AboutActionIcon(navController) } | |
) | |
} | |
) { innerPadding -> | |
LazyColumn(modifier = Modifier | |
.fillMaxSize() | |
.padding(innerPadding)) { | |
items(items) { item -> | |
Text( | |
text = stringResource(id = R.string.item_text, item), | |
style = MaterialTheme.typography.headlineMedium, | |
modifier = Modifier.padding(Dimen.spacing) | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment