BottomNavigationBar

Additional

Language
Java
Version
version-0.9.6 (Jun 28, 2019)
Created
Feb 26, 2017
Updated
Jul 3, 2022 (Retired)
Owner
Dima Saviuk (Dimezis)
Contributor
Dima Saviuk (Dimezis)
1
Activity
Badge
Generate
Download
Source code

BottomNavigationBar

Simple Bottom Navigation Bar for Android.

How to use it

  <com.eightbitlab.bottomnavigationbar.BottomNavigationBar
      android:id="@+id/bottom_bar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/colorPrimary"
      app:activeTabColor="@android:color/white"
      app:inactiveTabColor="@color/bottomBarDefaultTextColor"/>
  BottomBarItem item = new BottomBarItem(R.drawable.test_icon, R.string.title);

  bottomNavigationBar.addTab(item);
  
  // Optional badge 
  bottomNavigationBar.showBadge(position, badge);
  bottomBar.setOnSelectListener(new BottomNavigationBar.OnSelectListener() {
      @Override
      public void onSelect(int position) {
          doStuff(position);
      }
  });

Gradle

compile 'com.eightbitlab:bottomnavigationbar:0.9.6'

Why is it better than library X?

  1. Tabs without titles are supported

  2. Properly displayed in layout editor

  3. Simple layout, no nested containers

  4. Simple API and code

  5. Smooth native animations, no alpha or requestLayout() calls

  6. Properly scales to any height

  7. It's tiny. Much smaller than some average bottom bar lib

Why is it worse than library X?

  1. There's only a single behavior - fixed tabs. No shifting mode, no dynamic color change of bottom bar

  2. No special tablet mode

  3. Currently no animation customization