How To Build Android Bottom Navigation Step By Step

Bottom navigation bar is just like android navigation drawer containing link to your activities or fragments. its an new feature in android studio. Its similar to iOS phone where they have bottom navigation bar for most of the apps.

Bottom navigation is the latest feature in android studio 2.3. When you are creating new project you will see an option of “Bottom Navigation” select that and you are ready to go.

android-studio-bottom-navigation

If are not able to see option of bottom navigation. No worries you can still use it by giving latest version of android design dependency.

Now let’s start with adding strings in String.xml.

Now add the bottom Navigation items by Right click on menu -> New -> New Resources File. Now add the name of the new xml file. In our case it’s navigation.xml. Add the below code.

navigation.xml

Creating User Interface

Adding textview to change when bottom navigation item is clicked. Add the below code.
activity_main.xml

android-navigation-bar-bottom

Building Android Application   

  • Define the view Object in MainActivity.java.

  • Now Define the setOnNavigationItemSelectedListene method of BottomNavigationView.

  • Now Run the android application your Android Bottom Navigation View is ready.

android-navigation-bar-bottom android_nav_bottom android-bottom_nav

That’s all friends. If you are facing some problems or want to know more about Bottom Navigation View then do comment below I will reply you as soon as possible.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.