screenshot of BottomBar


(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.


The BottomBar is a custom view component that mimics the new Material Design Bottom Navigation pattern. It allows for easy navigation through different sections of an app.


  • Cleaner code and better APIs
  • Look, feel, and behavior defined in XML
  • Automated tests to prevent regressions
  • Easy addition of items through XML resource file
  • Ability to listen for selection events
  • Option to cancel selection of tabs
  • Customization of icons based on selection state
  • Animation for background color change when tab is selected
  • Support for drawing the BottomBar under the navigation bar


To use the BottomBar, follow these steps:

  1. Add the following Maven dependency to your Gradle file:
dependencies {
    implementation 'com.github.marcoscgdev:BottomBar:2.0'
  1. Create XML resource files to define your tabs. The icons for the tabs should be fully opaque, solid black color, 24dp, and with no padding.

  2. Add the BottomBar to your layout file and assign a resource id for your tabs XML file.

  3. Set up listeners in your file to handle selection events.

  4. Optionally, you can intercept tab selections or change icons based on the selection state.

  5. If you want the BottomBar to be drawn under the navigation bar, create a style that is a child of your main application theme and apply it in your AndroidManifest.xml file.


The BottomBar is a customizable navigation component that can be easily integrated into an Android app. With features such as automated tests, easy addition of items through XML, and the ability to listen for selection events, it provides a convenient solution for implementing the Material Design Bottom Navigation pattern. Additionally, it offers options for customization, such as changing icons based on selection state and animating the background color when a tab is selected.

Material Design

Material Design is a design system developed by Google that provides a set of guidelines, components, and tools for creating visually appealing and functional user interfaces. Material Design is designed to be flexible and customizable, making it a great choice for a wide range of applications and use cases.