# Implementing Bottom Navigation View in your app

DevFeed: [Implementing Bottom Navigation View in your app](<https://devfeed.tech/articles/implementing-bottom-navigation-view-in-your-app-25831.md>)

Original publisher: [Read original article](<https://segunfamisa.com/posts/bottom-navigation-view-android>)

Author: Segun Famisa

Published: 2016-10-24T08:42:45Z

Content type: tutorial

Language: en

Sources: [Segun Famisa](<https://devfeed.tech/sources/segun-famisa.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bottomnavigationview](<https://devfeed.tech/tags/bottomnavigationview.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [material-design](<https://devfeed.tech/tags/material-design.md>)

## AI overview

A tutorial showing how to implement Android's BottomNavigationView using version 25 of the Android Design Support Library. It covers adding the dependency, configuring the view and menu items, and handling item-selection events.

## Source excerpt

Sometimes in March 2016, Luke Wroblewski announced that the Bottom navigation bars were now a part of the material design guidelines. Until then, bottom nav bars were seen as an anti-pattern and were heavily kicked against. There have been several nice libraries to implement this bottom nav bar design, some of which include: https://github.com/roughike/BottomBar and https://github.com/aurelhubert/ahbottomnavigation. Just last week, Google (through Nick Butcher) announced the release of the v25 of the Android Design Support Library which includes the new BottomNavigationView. In this short post, I'll be showing how to use it in your Android app. If you are in a hurry, feel free to jump straight to look at the sample code here: https://github.com/segunfamisa/bottom-navigation-demo Setup To get started with this, you need the latest version (version 25) of Android SDK & tools (including SDK tools, build-tools, platform-tools, support repository). How to use it. 1. Add the design support library First step is to add the design support library to your app-level build.gradle file. Example is as shown below: dependencies { ... compile 'com.android.support:design:25.0.0' } 2. Add the BottomNavigationView to your layout Next step, is to add the actual bottom nav view to the layout. Typically, you will add something like: <android.support.design.widget.BottomNavigationView android:id="@+id/navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="start" design:menu="@menu/bottom_nav_items" /> The BottomNavigationView uses design:menu is a custom attribute that points to the menu resource containing items to be shown on the BottomNavigationView. There are other custom attributes for the view, including: design:itemBackground to set the background of the menu resource design:itemIconTint to set the tint which is applied to the item icons. design:itemTextColor to set the menu item text colour. 3. Define the nav items in the menu