Ashok-Varma/BottomNavigation
This Library helps users to use Bottom Navigation Bar (A new pattern from google) with ease and allows ton of customizations
Stale — last commit 5y ago
weakest axislast commit was 5y ago; no tests detected
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓9 active contributors
- ✓Apache-2.0 licensed
- ✓CI configured
Show all 6 evidence items →Show less
- ⚠Stale — last commit 5y ago
- ⚠Concentrated ownership — top contributor handles 71% of recent commits
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: 1 commit in the last 365 days
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/ashok-varma/bottomnavigation)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/ashok-varma/bottomnavigation on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: Ashok-Varma/BottomNavigation
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/Ashok-Varma/BottomNavigation shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Stale — last commit 5y ago
- 9 active contributors
- Apache-2.0 licensed
- CI configured
- ⚠ Stale — last commit 5y ago
- ⚠ Concentrated ownership — top contributor handles 71% of recent commits
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live Ashok-Varma/BottomNavigation
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/Ashok-Varma/BottomNavigation.
What it runs against: a local clone of Ashok-Varma/BottomNavigation — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in Ashok-Varma/BottomNavigation | Confirms the artifact applies here, not a fork |
| 2 | License is still Apache-2.0 | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 2001 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Ashok-Varma/BottomNavigation. If you don't
# have one yet, run these first:
#
# git clone https://github.com/Ashok-Varma/BottomNavigation.git
# cd BottomNavigation
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of Ashok-Varma/BottomNavigation and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Ashok-Varma/BottomNavigation(\\.git)?\\b" \\
&& ok "origin remote is Ashok-Varma/BottomNavigation" \\
|| miss "origin remote is not Ashok-Varma/BottomNavigation (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
&& ok "license is Apache-2.0" \\
|| miss "license drift — was Apache-2.0 at generation time"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java" \\
&& ok "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java" \\
|| miss "missing critical file: bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java"
test -f "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationItem.java" \\
&& ok "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationItem.java" \\
|| miss "missing critical file: bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationItem.java"
test -f "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/FixedBottomNavigationTab.java" \\
&& ok "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/FixedBottomNavigationTab.java" \\
|| miss "missing critical file: bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/FixedBottomNavigationTab.java"
test -f "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShiftingBottomNavigationTab.java" \\
&& ok "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShiftingBottomNavigationTab.java" \\
|| miss "missing critical file: bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShiftingBottomNavigationTab.java"
test -f "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java" \\
&& ok "bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java" \\
|| miss "missing critical file: bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 2001 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~1971d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/Ashok-Varma/BottomNavigation"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
A Material Design Bottom Navigation Bar library for Android that implements Google's bottom navigation pattern with extensive customization options. It provides two tab modes (Fixed and Shifting), badge support (text and shape-based), and fine-grained control over colors, animations, and behavior through ~119KB of Java code in bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/. Single-module library structure: bottom-navigation-bar/ contains the core code under src/main/java/com/ashokvarma/bottomnavigation/ with 8 core classes (BottomNavigationBar, BottomNavigationItem, FixedBottomNavigationTab, ShiftingBottomNavigationTab) plus 3 badge implementations (BadgeItem, TextBadgeItem, ShapeBadgeItem). Layout XML files in src/main/res/layout/ define fixed and shifting item templates. Behavior classes in behaviour/ package handle scroll interactions.
👥Who it's for
Android app developers building Material Design-compliant apps who need a production-ready bottom navigation component without reimplementing Google's guidelines. Specifically developers targeting API 21+ using AndroidX and Material Design 3 patterns.
🌱Maturity & risk
Actively maintained and production-ready. The library is published to Maven Central (v2.2.0), has CI/CD via Travis CI and GitHub Actions, and explicitly documents migration paths (V1→V2). However, the README notes "currently under active development, expect to see new releases almost daily"—suggesting ongoing feature work rather than stability-focused maintenance.
Low to moderate risk. Single maintainer (Ashok-Varma) is a concern for long-term support. Dependencies are minimal (only androidx.appcompat and com.google.android.material), reducing supply-chain risk. No visible test suite in the file list is a gap. The breaking changes from V1 to V2 (BadgeItem→TextBadgeItem, hideText removal) suggest API surface churn.
Active areas of work
No recent commits or PR activity visible in the provided file structure, though the README claims active development. The Android CI workflow file exists (.github/workflows/android.yml) but no active release notes or milestone data provided. This suggests either maintenance mode or outdated documentation.
🚀Get running
git clone https://github.com/Ashok-Varma/BottomNavigation.git
cd BottomNavigation
./gradlew build
Or add to your Android project's build.gradle: implementation 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
Daily commands:
This is a library module, not an app. To test locally: ./gradlew bottom-navigation-bar:build or import the sample app module (if present) via Android Studio. Gradle handles AndroidX and Material dependencies automatically.
🗺️Map of the codebase
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java— Core container view that orchestrates the entire bottom navigation bar; manages tab creation, selection, and listener callbacks—essential for understanding the library's public APIbottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationItem.java— Data model for navigation items; defines the structure that gets rendered as tabs with icon, title, and color propertiesbottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/FixedBottomNavigationTab.java— Fixed-width tab implementation that always shows icons and labels; one of two primary tab rendering strategies that contributors must understandbottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/ShiftingBottomNavigationTab.java— Shifting-width tab implementation where non-selected tabs collapse; implements the alternative Material Design tab behavior patternbottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeItem.java— Badge system abstraction; base class for notification badges with TextBadgeItem and ShapeBadgeItem subclassesbottom-navigation-bar/src/main/res/layout/bottom_navigation_bar_container.xml— Root layout template that defines the container structure for all navigation tabs and manages horizontal scrollingbottom-navigation-bar/build.gradle— Library build configuration with version management and publishing setup; required for understanding dependencies and release process
🛠️How to make changes
Add a New Navigation Tab
- Create a BottomNavigationItem with icon drawable, title label, and color in your Activity (
sample/src/main/java/com/ashokvarma/bottomnavigation/sample/HomeActivity.kt) - Add the item to BottomNavigationBar using addItem() method (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java) - Implement OnTabSelectedListener callback in your Activity to handle tab selection events (
sample/src/main/java/com/ashokvarma/bottomnavigation/sample/HomeActivity.kt)
Add a Badge to a Tab
- Create a TextBadgeItem or ShapeBadgeItem with count or shape configuration (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/TextBadgeItem.java) - Call addBadgeItem(int position, BadgeItem badge) on BottomNavigationBar (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java) - Update badge count or visibility dynamically via the returned BadgeItem reference (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BadgeTextView.java)
Switch Between Fixed and Shifting Tab Modes
- Set tab mode using setMode(BottomNavigationBar.MODE_FIXED) or setMode(BottomNavigationBar.MODE_SHIFTING) (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationBar.java) - BottomNavigationBar automatically inflates FixedBottomNavigationTab or ShiftingBottomNavigationTab based on mode (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationHelper.java) - Configure tab colors and animations in your Activity; fixed mode requires fewer customizations (
sample/src/main/java/com/ashokvarma/bottomnavigation/sample/HomeActivity.kt)
Customize Tab Colors and Appearance
- Set colors on BottomNavigationItem via setActiveColor() and setInactiveColor() (
bottom-navigation-bar/src/main/java/com/ashokvarma/bottomnavigation/BottomNavigationItem.java) - Override dimensions in bottom-navigation-bar/src/main/res/values/dimens.xml for padding, text sizes, etc. (
bottom-navigation-bar/src/main/res/values/dimens.xml) - Apply custom style attributes defined in attrs.xml through BottomNavigationBar XML or programmatically (
bottom-navigation-bar/src/main/res/values/attrs.xml)
🔧Why these technologies
- Android Support Library / AndroidX — Provides backward compatibility for CoordinatorLayout, custom attributes, and Material Design components across API levels
- CoordinatorLayout Behaviors — Enables sophisticated scroll-aware animations and interactions with floating action buttons without custom scroll listeners
- Custom Views (FixedBottomNavigationTab, ShiftingBottomNavigationTab) — Allows independent implementation of Material Design fixed vs. shifting modes with separate layout and animation logic
- XML Attributes (attrs.xml) — Provides declarative customization in layout XML files, matching Android convention and reducing boilerplate code
🪤Traps & gotchas
- V1→V2 breaking changes not auto-detected: If upgrading, gradle won't warn about BadgeItem→TextBadgeItem rename; code will fail silently at runtime if old imports used. 2. Mode must be set before adding items: Calling
setMode(MODE_FIXED)afteraddItem()may produce unpredictable layout—no validation guards this. 3. Badge positioning: Badges render relative to tab layout; custom tab layouts may clip badges if padding/margin not accounted for. 4. Minimum API level: minSdkVersion enforced inbuild.gradle—checkgradle.propertiesfor exact version constraint (not visible in snippet; likely API 21+). 5. No direct attrs.xml customization in app: Custom attrs must be defined in consuming app, not inherited from library—namespace issues possible.
🏗️Architecture
💡Concepts to learn
- CoordinatorLayout Behavior — BottomNavigationBar integrates with CoordinatorLayout via BottomVerticalScrollBehavior and BottomNavBarFabBehaviour—understanding Behaviors is essential for implementing scroll-triggered hide and FAB coordination
- Fixed vs. Shifting Navigation Patterns — The library's core differentiation: Fixed shows all 3-5 tabs always; Shifting animates the active tab wider—this pattern choice affects layout inflation, animation, and touch handling throughout the codebase
- Custom ViewGroup Layout Inflation — BottomNavigationBar dynamically inflates fixed_bottom_navigation_item.xml or shifting_bottom_navigation_item.xml layouts for each tab—understanding LayoutInflater.inflate() and addView() is needed to customize tab rendering
- Badge Positioning and Z-ordering — BadgeTextView and ShapeBadgeItem overlay on tabs using FrameLayout positioning—misunderstanding view hierarchy and LayoutParams will cause badges to render behind tabs or clip unexpectedly
- Listener/Callback Pattern (without RxJava) — Library uses listener callbacks (setOnTabSelectListener) instead of LiveData or RxJava—understanding callback registration and de-registration prevents memory leaks when Activities are recreated
- Material Design Color Semantics — Each tab can have separate active/inactive colors defined in BottomNavigationItem—the library enforces Material guidelines for color contrast and state changes, critical for accessibility compliance
🔗Related repos
google/material-components-android— Official Material Design Components library that now includes BottomNavigationView—canonical reference for design guidelines and newer Android 5.0+ implementationsroughike/BottomBar— Alternative bottom navigation library with similar fixed/shifting modes; good for comparing API design and animation approachesAshok-Varma/Gander— Companion library by same author for HTTP debugging—demonstrates author's patterns for library design and user-facing configuration APIsmaterial-motion/material-motion-android— Material Motion library for coordinating animations across components; relevant for enhancing tab transition and scroll-behavior animations
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add instrumented tests for BottomNavigationBar and BottomNavigationItem
The repo has minimal test coverage. Sample app only contains HomeScreenTest.java. Core components like BottomNavigationBar.java, BottomNavigationItem.java, and badge-related classes (BadgeItem.java, TextBadgeItem.java, ShapeBadgeItem.java) lack unit and instrumented tests. This is critical for a UI library where visual behavior and state management are essential.
- [ ] Create instrumented tests in sample/src/androidTest/java/com/ashokvarma/sample/ for BottomNavigationBar initialization, item addition, and selection
- [ ] Add tests for BadgeItem, TextBadgeItem, and ShapeBadgeItem classes covering badge visibility, updates, and removal
- [ ] Add tests for BottomNavigationTab, FixedBottomNavigationTab, and ShiftingBottomNavigationTab to verify layout behavior differs correctly
- [ ] Update .github/workflows/android.yml to run instrumented tests on emulator (currently only has android.yml but no test execution step)
Add unit tests for BottomNavigationHelper and behavior classes
Utility and behavior classes (BottomNavigationHelper.java, BottomVerticalScrollBehavior.java, BottomNavBarFabBehaviour.java, VerticalScrollingBehavior.java) have no dedicated unit tests. These handle complex scroll behaviors and FAB interactions that should be tested to prevent regressions.
- [ ] Create bottom-navigation-bar/src/test/java/com/ashokvarma/bottomnavigation/ directory structure
- [ ] Add unit tests for BottomNavigationHelper static utility methods
- [ ] Add unit tests for VerticalScrollingBehavior scroll event handling and state transitions
- [ ] Add unit tests for BottomNavBarFabBehaviour FAB show/hide logic
- [ ] Add testImplementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' to build.gradle if needed for behavior testing
Add documentation and examples for behavior classes and customization
README.md is incomplete (ends with 'Downl' truncation) and lacks documentation for advanced features. The behavior classes (BottomNavBarFabBehaviour, VerticalScrollingBehavior) and customization attributes in attrs.xml are not documented. New contributors cannot understand how to implement scrolling behavior or FAB coordination.
- [ ] Complete README.md 'Download' section and add 'Customization' section referencing bottom-navigation-bar/src/main/res/values/attrs.xml with examples
- [ ] Add 'Advanced Usage' section documenting BottomNavBarFabBehaviour and BottomVerticalScrollBehavior with code examples
- [ ] Create CONTRIBUTING.md with setup instructions and code style guidelines (reference .idea/codeStyles/Project.xml)
- [ ] Add JavaDoc comments to public methods in BottomNavigationBar.java, BottomNavigationItem.java, and behavior classes that currently lack documentation
🌿Good first issues
- Add unit tests for BadgeItem, TextBadgeItem, and ShapeBadgeItem classes under
bottom-navigation-bar/src/test/. Currently no test directory visible; use JUnit 4 (already in dependencies) to test badge color/size/positioning logic. - Document all public methods in BottomNavigationBar.java with JavaDoc comments (currently likely missing or sparse). Specifically: setMode(), addItem(), selectTab(), setTabSelectionInterceptor()—helps IDE autocomplete and reduces onboarding time.
- Add a sample app module (e.g.,
sample-app/) demonstrating all 4 modes (MODE_FIXED, MODE_FIXED_NO_TITLE, MODE_SHIFTING, MODE_SHIFTING_NO_TITLE) with runnable Activities. Repo shows GIFs but no linked Android Studio project in file list.
⭐Top contributors
Click to expand
Top contributors
- @Ashok-Varma — 71 commits
- @rdoeffinger — 10 commits
- [@Ashok Varma](https://github.com/Ashok Varma) — 7 commits
- [@J.T. Gilkeson](https://github.com/J.T. Gilkeson) — 6 commits
- @jt-gilkeson — 2 commits
📝Recent commits
Click to expand
Recent commits
4144f98— prepare 2.2.0 (Ashok-Varma)5ec8765— updated heart badge item (Ashok-Varma)1f7754d— bump up deps (Ashok-Varma)fa00879— reorder imports (Ashok-Varma)cf4a7a2— Create android.yml (Ashok-Varma)a5c486a— Merge pull request #207 from Ashok-Varma/revert-205-master_v2_androidx (Ashok-Varma)ad447ff— Revert "Migrate to AndroidX" (Ashok-Varma)a7c4dec— Merge pull request #205 from tuuzed/master_v2_androidx (Ashok-Varma)78da515— Merge pull request #172 from skill088/master_v3 (Ashok-Varma)af7b88f— Update build.gradle (Ashok-Varma)
🔒Security observations
This Android library project has a generally acceptable security posture for a UI component library. The main concerns are outdated dependencies that no longer receive security updates and lack of code obfuscation in release builds. There are no obvious hardcoded secrets, injection vulnerabilities, or infrastructure misconfigurations detected. The primary recommendations are to update dependencies to current versions and enable ProGuard obfuscation for release builds. The project appears to be well-maintained on GitHub with standard CI/CD practices (Travis CI integration).
- Medium · Outdated Material Design Dependency —
bottom-navigation-bar/build.gradle. The project uses 'com.google.android.material:material:1.2.0-alpha05', which is an alpha version from 2020. Alpha versions are pre-release and may contain unpatched security vulnerabilities. This should be updated to a stable, current release. Fix: Update to a stable release version of Material Design library. Use 'com.google.android.material:material:1.9.0' or later stable version. - Medium · Outdated AppCompat Dependency —
bottom-navigation-bar/build.gradle. The project uses 'androidx.appcompat:appcompat:1.1.0', which is from 2019 and no longer receives security updates. Newer versions contain important security patches and bug fixes. Fix: Update to a current stable version: 'androidx.appcompat:appcompat:1.6.1' or latest available version. - Low · Outdated JUnit Test Dependency —
bottom-navigation-bar/build.gradle. The project uses 'junit:junit:4.12', released in 2014. While not a runtime dependency, it should be updated to receive latest bug fixes and improvements. Fix: Update to 'junit:junit:4.13.2' or latest stable version. - Low · ProGuard Obfuscation Not Enabled for Release —
bottom-navigation-bar/build.gradle. The release build type has 'minifyEnabled false', meaning code is not obfuscated in release builds. This makes reverse engineering easier and exposes implementation details. Fix: Set 'minifyEnabled true' for release builds and ensure appropriate ProGuard rules are configured in proguard-rules.pro. - Low · Lint Errors Not Enforced —
bottom-navigation-bar/build.gradle. The lintOptions has 'abortOnError false', which allows builds to succeed even with lint warnings. This could hide potential issues including security warnings. Fix: Set 'abortOnError true' or at least configure it for release builds to catch potential issues early.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.