Implementing a bottom navigation bar using navigation destinations
In Android development, having a bottom navigation bar is very common; it helps inform your users that there are different sections in your application. In addition, other apps opt to include a navigation drawer activity, which holds a profile and additional information about the application.
An excellent example of an app that utilizes both – a navigation drawer and bottom navigation – is Twitter. It is also important to mention that some companies prefer to have a top navigation bar as a preference. In addition, others such as Google Play Store have both bottom and drawer navigation.
Getting ready
Create a new Android project with your preferred editor or Android Studio, or you can use any project from previous recipes.
How to do it…
In this recipe, we are going to create a new project and call it BottomNavigationBarSample
:
- After creating our new empty
Activity BottomNavigationBarSample...