Created
December 8, 2022 17:25
-
-
Save MrNtlu/37482e38c966728abc5baf30c9ec23fb to your computer and use it in GitHub Desktop.
Jetpack Compose App Bar Part 1
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 MainScreen( | |
navController: NavHostController, | |
) { | |
Scaffold( | |
//... | |
topBar = { | |
TopAppBar( | |
title = { | |
Text(text = "Jetpack Compose") | |
}, | |
navigationIcon = { | |
IconButton( | |
onClick = { //... } | |
) { | |
Icon(imageVector = Icons.Rounded.Menu, contentDescription = "Drawer Icon") | |
} | |
}, | |
actions = { | |
IconButton(onClick = { //... }) { | |
Icon( | |
imageVector = Icons.Rounded.Search, | |
contentDescription = "", | |
tint = Color.White, | |
) | |
} | |
}, | |
) | |
}, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment