gitmyhub

BottomBar

Java ★ 8.4k updated 4y ago

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

A deprecated Android library for adding a Material Design bottom navigation bar to apps, now archived and replaced by Google's official BottomNavigationView, kept as a historical reference.

JavaAndroidXMLsetup: easycomplexity 2/5

BottomBar is a now-deprecated Android library that adds a bottom navigation bar to mobile apps. A bottom navigation bar is the row of icons along the bottom of an app screen that lets users switch between main sections, a pattern popularized by apps like Instagram or YouTube. This library was built to match Google's Material Design guidelines for that pattern before Google shipped their own official component.

The author is clear in the README that this project is no longer maintained. They wrote it quickly, without sufficient testing, and acknowledge the code has unpredictable behavior as a result. Their own recommendation is to use Google's official BottomNavigationView component instead, which is part of the standard Android support library and receives ongoing updates from Google's team.

For anyone still using the library, setup involves defining your navigation tabs in an XML file (specifying an icon and label for each tab), then dropping the BottomBar component into your layout XML and pointing it at that tabs file. You then write a few lines of Java code to respond when a user taps a tab. The library also supports intercepting tab switches, which is useful for gating certain tabs behind a purchase or login flow, and allows different icons to display when a tab is selected versus unselected.

Version 2 of the library (the last major release before deprecation) changed the configuration approach to be more XML-driven rather than code-driven. The library requires Android API level 11 (known as Honeycomb, released in 2011) or higher, meaning it drops support for very old Android devices.

Given that the project is archived and unmaintained, it is best treated as a historical reference rather than something to use in a new project.

Where it fits