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?
-
Tabs without titles are supported
-
Properly displayed in layout editor
-
Simple layout, no nested containers
-
Simple API and code
-
Smooth native animations, no alpha or requestLayout() calls
-
Properly scales to any height
-
It's tiny. Much smaller than some average bottom bar lib
Why is it worse than library X?
-
There's only a single behavior - fixed tabs. No shifting mode, no dynamic color change of bottom bar
-
No special tablet mode
-
No badges with counters