Skip to main content

Posts

Showing posts with the label BottomAppBar

jetpack compose - BottomAppBar with FAB example

Compose BottomAppBar With FAB The BottomAppBar is a useful android jetpack compose library widget. The BootomAppBar displays the bottom navigation items in its ‘content’ placeholder. BottomAppBar ‘content’ parameter has a Row scope, so items inside it display horizontally side by side. We can change the BottomAppBar default background color, content color, elevation, and content padding size. Even we can optionally embed a FloatingActionButton with the BottomAppBar widget. The following android application development tutorial will demonstrate to us how we can embed a FloatingActionButton inside BottomAppBar in a kotlin jetpack compose application. To do that at first, we have to add a Scaffold widget into our composable function. The Scaffold widget implements the basic material design visual layout structure in a jetpack compose application. Scaffold widget provides API to insert several material components to construct app screen such as TopAppBar, BottomAppBar, FloatingActi...

jetpack compose - How to use BottomAppBar

Compose BottomAppBar The BottomAppBar is an android jetpack compose library widget. The BootomAppBar displays navigation and key actions at the bottom position on an android application user interface. BottomAppBar can optionally display a FloatingActionButton embedded with it. BottomAppBar ‘content’ parameter has a Row scope, so when we put some BottomNavigationItems inside this, they are displayed horizontally side by side. Each BottomNavigationItem instance shows an action button for bottom navigation. The BottomAppBar ‘cutoutShape’ parameter allows us to embed a floating action button. The ‘cutoutShape’ specified the shape used for FloatingActionButton which is embedded with BottomAppBar such as a CircleShape, RoundedCornerShape, etc. Android jetpack compose developer can change the bottom app bar background color using its ‘backgroundColor’ parameter. Now is the time for changing the content color, android app developer can set a color for BottomAppBar content color by p...