BottomNavigationBar

Additional

Language
Java
Version
N/A
Created
Feb 27, 2017
Updated
Mar 19, 2017
Owner
Dmitry Saviuk (Dimezis)
Contributor
Dmitry Saviuk (Dimezis)
1
Activity
Badge
Generate
Download
Source code

Announcement

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);
  bottomBar.setOnSelectListener(new BottomNavigationBar.OnSelectListener() {
      @Override
      public void onSelect(int position) {
          doStuff(position);
      }
  });

Gradle

compile 'com.eightbitlab:bottomnavigationbar:0.9.5'

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. No badges with counters