RepoPilotOpen in app →

Clans/FloatingActionButton

Android Floating Action Button based on Material Design specification

Mixed

Stale — last commit 7y ago

weakest axis
Use as dependencyMixed

last commit was 7y ago; no tests detected…

Fork & modifyMixed

no tests detected; no CI workflows detected…

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isMixed

last commit was 7y ago; no CI workflows detected

  • 9 active contributors
  • Apache-2.0 licensed
  • Stale — last commit 7y ago
Show all 6 evidence items →
  • Concentrated ownership — top contributor handles 77% of recent commits
  • No CI workflows detected
  • No test directory detected
What would change the summary?
  • Use as dependency MixedHealthy if: 1 commit in the last 365 days; add a test suite
  • Fork & modify MixedHealthy if: add a test suite
  • Deploy as-is MixedHealthy if: 1 commit in the last 180 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 "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/clans/floatingactionbutton?axis=learn)](https://repopilot.app/r/clans/floatingactionbutton)

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/clans/floatingactionbutton on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: Clans/FloatingActionButton

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:

  1. 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.
  2. 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.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/Clans/FloatingActionButton 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 7y ago

  • 9 active contributors
  • Apache-2.0 licensed
  • ⚠ Stale — last commit 7y ago
  • ⚠ Concentrated ownership — top contributor handles 77% of recent commits
  • ⚠ No CI workflows detected
  • ⚠ 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 Clans/FloatingActionButton repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/Clans/FloatingActionButton.

What it runs against: a local clone of Clans/FloatingActionButton — 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 Clans/FloatingActionButton | 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 ≤ 2523 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>Clans/FloatingActionButton</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Clans/FloatingActionButton. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/Clans/FloatingActionButton.git
#   cd FloatingActionButton
#
# 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 Clans/FloatingActionButton and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Clans/FloatingActionButton(\\.git)?\\b" \\
  && ok "origin remote is Clans/FloatingActionButton" \\
  || miss "origin remote is not Clans/FloatingActionButton (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 "library/src/main/java/com/github/clans/fab/FloatingActionButton.java" \\
  && ok "library/src/main/java/com/github/clans/fab/FloatingActionButton.java" \\
  || miss "missing critical file: library/src/main/java/com/github/clans/fab/FloatingActionButton.java"
test -f "library/src/main/java/com/github/clans/fab/FloatingActionMenu.java" \\
  && ok "library/src/main/java/com/github/clans/fab/FloatingActionMenu.java" \\
  || miss "missing critical file: library/src/main/java/com/github/clans/fab/FloatingActionMenu.java"
test -f "library/src/main/java/com/github/clans/fab/Label.java" \\
  && ok "library/src/main/java/com/github/clans/fab/Label.java" \\
  || miss "missing critical file: library/src/main/java/com/github/clans/fab/Label.java"
test -f "library/src/main/res/values/attrs.xml" \\
  && ok "library/src/main/res/values/attrs.xml" \\
  || miss "missing critical file: library/src/main/res/values/attrs.xml"
test -f "library/build.gradle" \\
  && ok "library/build.gradle" \\
  || miss "missing critical file: library/build.gradle"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 2523 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~2493d)"
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/Clans/FloatingActionButton"
  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).

</details>

TL;DR

This is a Material Design-compliant Floating Action Button (FAB) library for Android that provides a customizable, feature-rich implementation of the official Material Design FAB spec. It includes FloatingActionButton (single button with optional progress indicator) and FloatingActionMenu (button that expands to reveal multiple action buttons) components, with support for ripple effects, custom animations, shadow control, and both normal (56dp) and mini (40dp) sizes. Standard Android library monorepo structure: /library contains the source code with core classes (FloatingActionButton.java, FloatingActionMenu.java, Label.java, Util.java) in /library/src/main/java/com/github/clans/fab/, resource animations and drawables in /library/src/main/res/, and a /sample app demonstrating all features. No test coverage visible in file structure.

👥Who it's for

Android app developers building Material Design-compliant UIs who need production-ready FAB components with advanced features like menu expansion, label support, and custom animations without implementing Material Design specs from scratch.

🌱Maturity & risk

Mature but discontinued: the README explicitly states 'FURTHER DEVELOPMENT AND SUPPORT IS DISCONTINUED.' The library was published to Maven Central (com.github.clans:fab:1.6.4) and is production-stable, but is no longer actively maintained. Last architecture visible is Gradle 2.1.0-era tooling.

HIGH RISK FOR NEW PROJECTS: The maintainers have officially discontinued development, meaning no security updates or Android API-level support for modern versions (currently minSdk 14, API levels 21+ are standard now). Single-maintainer (@Clans org) with no visible CI/CD setup (no .yml files in repo). Consider Google's Material Components library (com.google.android.material:material) as a modern replacement.

Active areas of work

Nothing — development is discontinued as per README warning. No active branches, PRs, or recent commits are visible in the provided data. The repo exists as read-only documentation/archive.

🚀Get running

  1. Clone: git clone https://github.com/Clans/FloatingActionButton.git && cd FloatingActionButton. 2. Sync Gradle: ./gradlew clean build (uses included Gradle wrapper). 3. Run sample app: ./gradlew :sample:installDebug or open in Android Studio (File > Open > select project root).

Daily commands: Open in Android Studio → Sync Gradle → Run sample/ module on emulator/device. Or CLI: ./gradlew :sample:installDebug && adb shell am start com.dmytrotarianyk.fab/.MainActivity.

🗺️Map of the codebase

  • library/src/main/java/com/github/clans/fab/FloatingActionButton.java — Core FAB widget implementation—handles rendering, animations, and user interactions; the primary public API that all consumers use
  • library/src/main/java/com/github/clans/fab/FloatingActionMenu.java — Menu container for multiple FABs—orchestrates layout, animation timing, and state management for the entire FAB menu system
  • library/src/main/java/com/github/clans/fab/Label.java — Label widget paired with FABs—renders text labels and handles positioning/animations alongside menu items
  • library/src/main/res/values/attrs.xml — Defines all custom XML attributes for FAB and menu customization; required to understand configuration options
  • library/build.gradle — Library build configuration, dependencies, and publishing setup—critical for compilation and distribution
  • library/src/main/res/anim/fab_scale_up.xml — Core animation resource referenced by FAB class; defines default expand animation behavior

🧩Components & responsibilities

  • FloatingActionButton (Custom View, Canvas drawing, AnimationListener) — Single FAB widget; renders button, handles click events, applies animations, displays label and progress indicator
    • Failure mode: Touch events not detected; animation stutter if hardware acceleration disabled; drawable fails to load if res ID invalid
  • FloatingActionMenu (ViewGroup, Animation sequencing, Layout manager) — Container managing multiple FABs; orchestrates expansion/collapse animation sequence, calculates item positions, holds state
    • Failure mode: Menu items overlap if layout calculation incorrect; animation sequence stalls if child FAB count changes mid-animation
  • Label (Custom View, Paint, Rect layout) — Text label widget paired with FAB; renders label background and text, positioned relative to parent FAB
    • Failure mode: Text truncation if bounds too small; label not positioned if parent FAB onDraw() called before Label layout pass
  • Android Animation System (anim/ XML resources) (Anim) — Provides scale, translate, and fade animations for menu expansion/collapse and item entry/exit

🛠️How to make changes

Add a new FAB menu with custom items

  1. Define menu layout in XML using FloatingActionMenu as root container (sample/src/main/res/layout/menus_fragment.xml)
  2. Reference custom attributes from attrs.xml (fab_colorNormal, fab_colorPressed, fab_icon) (library/src/main/res/values/attrs.xml)
  3. Instantiate FloatingActionMenu and add FloatingActionButton children in Activity/Fragment code (sample/src/main/java/com/github/clans/fab/sample/MenusFragment.java)
  4. Set click listeners on child FABs and call menu.close() to collapse after action (library/src/main/java/com/github/clans/fab/FloatingActionButton.java)

Customize FAB appearance and animation

  1. Set custom attributes in XML (fab_colorNormal, fab_colorPressed, fab_size, fab_icon) (library/src/main/res/values/attrs.xml)
  2. Use dimension constants from dimens.xml or override with custom values (library/src/main/res/values/dimens.xml)
  3. Reference animation resources from fab_scale_up.xml, fab_slide_in_from_right.xml, etc. via fab_menu_open_anim attribute (library/src/main/res/anim/fab_scale_up.xml)
  4. Apply FAB.setLabelView() to attach custom Label widget for text display (library/src/main/java/com/github/clans/fab/Label.java)

Add a progress-based FAB indicator

  1. Create ProgressFragment layout with FloatingActionButton as child element (sample/src/main/java/com/github/clans/fab/sample/ProgressFragment.java)
  2. Use fab_progress attribute in FloatingActionButton to enable progress mode (library/src/main/res/values/attrs.xml)
  3. Call FloatingActionButton.setProgress() or setIndeterminate() methods to update progress state (library/src/main/java/com/github/clans/fab/FloatingActionButton.java)

🔧Why these technologies

  • Android API 14+ (Custom Views) — Direct custom View subclassing allows full control over rendering, animations, and Material Design compliance without external library dependencies
  • XML Attributes (attrs.xml) — Enables declarative configuration in layout XMLs, following Android conventions and supporting theme-based customization
  • Android Animation Framework (AnimationSet, ScaleAnimation, TranslateAnimation) — Native, efficient animations with GPU acceleration support; integrates seamlessly with Android lifecycle
  • Gradle Multi-Module (library + sample) — Separates reusable library code from demo app; sample serves as integration tests and usage documentation

⚖️Trade-offs already made

  • Pure custom Views instead of Fragments or ViewGroups with pre-built children

    • Why: Enables lightweight, fully-controlled animations and precise Material Design compliance
    • Consequence: More complex internal state management; harder to integrate with modern Jetpack Compose
  • No external dependencies (no AndroidX, no Material Design library)

    • Why: Minimal footprint and maximum compatibility across API levels 14+
    • Consequence: Must re-implement some Material Design patterns; no built-in accessibility features beyond basic Android framework support
  • XML-based animations instead of programmatic Animation API

    • Why: Encourages reuse, allows designers to tweak animations without code changes
    • Consequence: Less dynamic—difficult to animate based on runtime conditions without loading different XML files

🚫Non-goals (don't propose these)

  • Does not support AndroidX or Jetpack Compose; targets classic Android Views only
  • Does not provide built-in accessibility features (TalkBack, etc.); relies on Android framework defaults
  • Does not handle nested menus or multi-level hierarchies
  • Does not provide real-time synchronization or state persistence across process death
  • Development is discontinued—no active maintenance or new feature support

🪤Traps & gotchas

  1. minSdkVersion 14 is ancient: Codebase predates Android 5.0 Lollipop (API 21); modern projects target API 21+. Ripple effects work differently on pre-Lollipop. 2. No test coverage: /sample/src/androidTest/java/ contains only a stub ApplicationTest.java — unit tests for FAB behavior are absent. 3. Gradle version mismatch: build.gradle uses classpath 'com.android.tools.build:gradle:2.1.0' (from 2016) — will fail on modern Android Studio; must update AGP. 4. Resource naming convention: Uses fab_ prefix for all drawable assets (fab_add.png at multiple densities) — if you add new buttons, follow this naming. 5. No animation customization callback: Menu expansion animations are hardcoded; no listener API for animation events.

🏗️Architecture

💡Concepts to learn

  • material-components/material-components-android — Official Google Material Design library with modern FAB implementation (com.google.android.material:material) — the recommended replacement for this discontinued library
  • Android/architecture-samples — Google's reference Android architecture patterns — shows modern Gradle setup, testing strategies, and API level targets that this repo should follow
  • airbnb/lottie-android — Animation library commonly paired with FABs for custom expand/collapse animations and progress indicators
  • facebook/react-native — If building cross-platform, React Native community has native module wrappers for FABs from this library
  • square/retrofit — Ecosystem companion — many apps using this FAB library also use Retrofit for networking in the same era of Android development

🪄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.

Migrate from deprecated Gradle syntax to modern Android Gradle Plugin

The repo uses Android Gradle Plugin 2.1.0 (from 2016) which is severely outdated. This causes compatibility issues with modern Android Studio versions and newer Java/Kotlin toolchains. Updating to AGP 7.x+ with proper DSL changes would modernize the build system and improve maintainability.

  • [ ] Update build.gradle: classpath 'com.android.tools.build:gradle:7.4.2' (or latest stable)
  • [ ] Update gradle/wrapper/gradle-wrapper.properties to use Gradle 7.6+ instead of whatever 2.1.0 targets
  • [ ] Migrate library/build.gradle to use android {} block instead of deprecated syntax
  • [ ] Update SDK target and compile versions in library/build.gradle and sample/build.gradle to targetSdkVersion 33+
  • [ ] Test sample app builds and runs on Android Studio Arctic Fox or newer
  • [ ] Update jcenter() references to mavenCentral() in buildscript repositories section

Add unit tests for FloatingActionButton and FloatingActionMenu core classes

The library lacks automated tests for its core components (FloatingActionButton.java, FloatingActionMenu.java, Label.java). The sample app has only one androidTest stub. Adding proper unit and instrumented tests would prevent regressions, increase code confidence, and help future contributors.

  • [ ] Create library/src/test/java/com/github/clans/fab/ directory for JVM unit tests
  • [ ] Add unit tests for FloatingActionButton.java covering button state, color changes, and animation flags
  • [ ] Add unit tests for FloatingActionMenu.java covering menu open/close logic and item management
  • [ ] Create library/src/androidTest/java/com/github/clans/fab/ directory for instrumented tests
  • [ ] Add instrumented tests for animation behavior (fab_scale_up.xml, fab_slide_in_from_left.xml, etc.)
  • [ ] Add testImplementation and androidTestImplementation dependencies (JUnit4, Espresso, AndroidX Test) to library/build.gradle

Add GitHub Actions CI/CD workflow to validate builds and run tests on every PR

The repo lacks any CI/CD automation. With the project marked as discontinued, having automated checks would help new maintainers/forks ensure PRs don't break the build. A GitHub Actions workflow is free and requires minimal setup.

  • [ ] Create .github/workflows/android-ci.yml with checkout, Java setup, and Gradle build steps
  • [ ] Configure the workflow to run on push to main/master and on all pull requests
  • [ ] Add test execution step: './gradlew test connectedAndroidTest' to run unit and instrumented tests
  • [ ] Add lint checks: './gradlew lint' for library module to catch code quality issues
  • [ ] Set workflow to build both library and sample modules to catch integration issues
  • [ ] Document the workflow status in README.md with a badge referencing the Actions workflow

🌿Good first issues

  • Add unit tests for FloatingActionButton color/size changes: Create /library/src/test/java/com/github/clans/fab/FloatingActionButtonTest.java with JUnit tests for setColorNormal(), setSize(), and shadow property setters — currently zero test coverage exists.
  • Update build.gradle to use modern Android Gradle Plugin: Upgrade com.android.tools.build:gradle:2.1.0 to 7.x or 8.x and minSdkVersion from 14 to 21 to support current Android toolchain — this is blocking local development on modern Android Studio.
  • Add JavaDoc comments to public APIs: Document all public methods in FloatingActionButton.java and FloatingActionMenu.java (setColorNormal, addMenuButton, expandMenu, etc.) — currently completely undocumented inline, forcing developers to read source.

Top contributors

Click to expand
  • @Clans — 77 commits
  • [@Dmytro Tarianyk](https://github.com/Dmytro Tarianyk) — 15 commits
  • @rgabrysiak — 2 commits
  • [@Sean McQuillan](https://github.com/Sean McQuillan) — 1 commits
  • @cziemba — 1 commits

📝Recent commits

Click to expand
  • d3feaad — Update README.md (Clans)
  • ff4d0a2 — Update README.md (Clans)
  • ca292cc — Update README.md (Clans)
  • bf27b8e — Version bump (Clans)
  • dfaac1d — Fixed changing Lable's background programmatically. (Dmytro Tarianyk)
  • ad11d7b — Merge pull request #266 from Clans/dev (Clans)
  • e130e5d — Merge pull request #223 from remind101/master (Clans)
  • 9c285e2 — Merge pull request #174 from cziemba/master (Clans)
  • a79e246 — Fixed close on touch outside. Closes #248. (Dmytro Tarianyk)
  • 7254f3a — Fixed Label long click. Closes #250. (Dmytro Tarianyk)

🔒Security observations

The FloatingActionButton library presents moderate security concerns primarily due to outdated build tools (Gradle 2.1.0 from 2016), reliance on the defunct jcenter() repository, and most critically, being an abandoned project with no active maintenance or security updates. The codebase itself appears to be a straightforward Android UI library without obvious injection vulnerabilities, but the lack of modern security practices in the build configuration and discontinued development status present significant risks for production use. Immediate action is recommended to either update the build system or migrate to an actively maintained alternative.

  • High · Outdated Gradle Build Tool Version — build.gradle (buildscript dependencies). The project uses Gradle build tool version 2.1.0, released in 2016. This version contains known security vulnerabilities and lacks security patches for dependency resolution and build system exploits. Fix: Update to the latest stable Gradle version (currently 8.x). Run 'gradle wrapper --gradle-version <latest>' to update the wrapper.
  • High · Deprecated Repository - jcenter() — build.gradle (repositories configuration). The project relies on jcenter() repository which has been shutdown by JFrog (as of February 2021). This creates build reliability issues and potential security risks as dependencies cannot be resolved from a defunct repository. Fix: Replace jcenter() with mavenCentral() or other actively maintained repositories. Update all instances in buildscript and allprojects blocks.
  • Medium · Missing Security Configuration in ProGuard Rules — library/proguard-rules.pro. The library includes ProGuard rules (library/proguard-rules.pro) but no detail was provided on its content. ProGuard misconfiguration can expose sensitive code through debugging or reverse engineering. Fix: Review and ensure ProGuard rules properly obfuscate sensitive classes. Include rules for removing logging statements and sensitive data. Verify -dontskipnonpubliclibraryclasses and -dontskipnonpubliclibraryclassmembers are configured.
  • Medium · Project Maintenance Discontinued — README.md. The README explicitly states 'WARNING! FURTHER DEVELOPMENT AND SUPPORT IS DISCONTINUED.' This library is no longer actively maintained and will not receive security patches or updates. Fix: Consider migrating to an actively maintained Material Design floating action button library. If using this library in production, implement additional security audits and maintain a custom fork with security patches.
  • Low · Missing Gradle Plugin Security Configuration — build.gradle. The build.gradle does not specify secure gradle plugin repositories or implement dependency verification/pinning mechanisms. Fix: Implement gradle dependency verification via gradle/verification-metadata.xml, or use dependency pinning/locking to prevent supply chain attacks.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · Clans/FloatingActionButton — RepoPilot