From the course: Android Compose with Kotlin

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Add a bottom navigation component

Add a bottom navigation component - Kotlin Tutorial

From the course: Android Compose with Kotlin

Add a bottom navigation component

- [Instructor] A navigation bar provides users access to key features of your app. It's a parameter of the scaffold composable, which allows it to play nicely with the other components like floating action buttons or snap bars. We're going to add one to our sample app. Here on line number 27 where we've defined our scaffold composable. We'll use its bottom bar parameter and then we're going to set it equal to the following. We're going to use a navigation bar composable. And then for its values, we define each of the different navigation bar items. So this is going to be now a navigation bar item composable. And for its properties, the first one that we'll use is the icon. And so for the icon, we're going to set that equal to an icon composable. So there's a lot of nesting going on here. For us let's use the image vector version. So just select that first one. We're going to use an image vector, and we'll use icons.filled.DateRange for this one. And then for our content description…

Contents