Integrating toolbars and menus
Early Android versions did not know about action or app bars. They were introduced with API level 11 (Honeycomb). The options menu, on the other hand, has been around since the beginning but was opened by pressing a dedicated hardware button and shown at the bottom of the screen. With Android 3, it moved to the top and became a vertical list. Some elements could be made available permanently as actions. In a way, the options menu and the action bar merged. While originally, all the aspects of the action bar were handled by the hosting activity, the AppCompat
support library introduced an alternative implementation (getSupportActionBar()
). It is still widely used today as part of Jetpack.
Using Scaffold() to structure your screen
Jetpack Compose includes several app bar implementations that closely follow Material Design or Material You specifications. They can be added to a Compose UI through Scaffold()
, a composable function that acts as an app...