Open Android Studio, create a new project, and select a Blank Activity template, as shown below. As a bonus, you'll also learn how to use Android Studio templates to bootstrap your project with a bottom navigation bar quickly. Jetpack is a suite of libraries to help developers write code that works consistently across Android versions and devices. You will use AndroidX navigation, which is part of the Jetpack suite of libraries. In this post, you'll learn how to display menu items inside a bottom navigation bar in Android. The following screenshot is from the Google Discover app displaying an Android bottom navigation bar. You can see this yourself by downloading the Google Discover app from the Google Play Store (if you don't already have it on your device). Tapping on a bottom navigation icon takes you directly to the associated view or refreshes the currently active view.Īccording to the official Material Design guidelines for the Android bottom navigation bar, it should be used when your app has:Īn example of a popular app that implements the bottom navigation bar is the Google Discover Android app from Google, which uses it to navigate to different destinations of the app. The material design team at Google defines the functionality of bottom navigation bars in Android as follows:īottom navigation bars make it easy to explore and switch between top-level views in a single tap.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |