Scaffold and TopAppBar
App bars are an important part of your app, both visually and for navigation and menus. It is a good idea for Coda Pizza to include an app bar, even if it is just to show a title.
To reinstate your app bar, you will use the TopAppBar composable. TopAppBar accepts several composables as inputs, each of which can add content in a specific region of the app bar. You will only set the title parameter to show the application name, matching the default behavior of the automatically provided app bar – but with the benefit of using your Compose theme.
If you wanted, you could also provide a parameter for a navigationIcon to add an element to be the Up button. There is also a parameter called actions, which takes ...
Get Android Programming: The Big Nerd Ranch Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.