castorflex/SmoothProgressBar
A small Android library allowing you to have a smooth and customizable horizontal or circular indeterminate ProgressBar
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.
- ✓12 active contributors
- ✓Apache-2.0 licensed
- ✓CI configured
Show all 6 evidence items →Show less
- ⚠Stale — last commit 5y ago
- ⚠Single-maintainer risk — top contributor 86% 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/castorflex/smoothprogressbar)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/castorflex/smoothprogressbar on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: castorflex/SmoothProgressBar
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/castorflex/SmoothProgressBar 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
- 12 active contributors
- Apache-2.0 licensed
- CI configured
- ⚠ Stale — last commit 5y ago
- ⚠ Single-maintainer risk — top contributor 86% 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 castorflex/SmoothProgressBar
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/castorflex/SmoothProgressBar.
What it runs against: a local clone of castorflex/SmoothProgressBar — 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 castorflex/SmoothProgressBar | 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 ≤ 1843 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of castorflex/SmoothProgressBar. If you don't
# have one yet, run these first:
#
# git clone https://github.com/castorflex/SmoothProgressBar.git
# cd SmoothProgressBar
#
# 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 castorflex/SmoothProgressBar and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "castorflex/SmoothProgressBar(\\.git)?\\b" \\
&& ok "origin remote is castorflex/SmoothProgressBar" \\
|| miss "origin remote is not castorflex/SmoothProgressBar (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/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java" \\
&& ok "library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java" \\
|| miss "missing critical file: library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java"
test -f "library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java" \\
&& ok "library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java" \\
|| miss "missing critical file: library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java"
test -f "library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressBar.java" \\
&& ok "library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressBar.java" \\
|| miss "missing critical file: library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressBar.java"
test -f "library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.java" \\
&& ok "library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.java" \\
|| miss "missing critical file: library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.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"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 1843 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~1813d)"
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/castorflex/SmoothProgressBar"
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
SmoothProgressBar is an Android library that provides smooth, customizable indeterminate progress indicators with two variants: a horizontal SmoothProgressBar (min API 7) and a CircularProgressBar (min API 14). It replaces Android's default choppy indeterminate progress animation with a fluid, continuously-animating drawable that supports multiple color sections, custom speeds, stroke widths, and animation modes (reversed, mirrored, progressive start/stop). Multi-module Gradle project: library/ contains the horizontal SmoothProgressBar implementation (SmoothProgressBar.java, SmoothProgressDrawable.java) using custom Drawable animation; library-circular/ contains the circular variant (CircularProgressBar.java, CircularProgressDrawable.java) with delegate pattern (PBDelegate, DefaultDelegate, PowerSaveModeDelegate) for animation strategy. Resource files (attrs.xml, defaults.xml) define XML configuration attributes; version-specific styles (values-v11/, values-v21/) handle platform differences.
👥Who it's for
Android app developers building UX-conscious applications who need polished loading indicators beyond Android's default ProgressBar. Specifically useful for developers targeting lower API levels (7+) and those building custom themes where the native progress bar doesn't match design requirements.
🌱Maturity & risk
Actively maintained production library. Published on Maven Central with stable versioning (snapshots available at 1.4.0), demonstrating multi-year maturity. Build pipeline configured with Travis CI (.travis.yml present). However, no test directory visible in file listing suggests limited automated test coverage.
Low-risk, focused library with minimal external dependencies (only support-annotations:26.0.1 listed). Single maintainer (castorflex) creates maintainability risk if unavailable. API is stable (71KB of Java code across two modules) but lack of visible test infrastructure means regressions could slip through. No recent commit dates visible in provided data, so update recency unclear.
Active areas of work
No active PR or issue data provided in repository snapshot. CHANGELOG.md exists but content not shown. Library appears in maintenance mode rather than active feature development—no breaking changes or major refactoring evident from structure.
🚀Get running
Clone the repo, then build with Gradle: git clone https://github.com/castorflex/SmoothProgressBar.git && cd SmoothProgressBar && ./gradlew build. Dependencies are managed via Gradle (see build.gradle, gradle.properties in each module). Use ./gradlew assemble to build both library modules without running tests.
Daily commands:
This is a library, not an executable app. Build it with ./gradlew assemble to generate AARs in library/build/outputs/aar/ and library-circular/build/outputs/aar/. To use in an app, add the Maven Central dependency to your app's build.gradle (shown in README). No dev server or local runtime; testing requires creating a sample Android app that imports the library (sample app mentioned in README as available on Play Store but not in this repo).
🗺️Map of the codebase
library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java— Main horizontal progress bar widget that extends ProgressBar and integrates SmoothProgressDrawable; entry point for the core horizontal animation featurelibrary/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java— Core animation engine rendering smooth indeterminate progress with configurable colors and interpolation; handles all drawable rendering logiclibrary-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressBar.java— Circular variant of progress bar; demonstrates the multi-module architecture for supporting different progress bar shapeslibrary-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.java— Circular animation drawable implementing the same pattern as SmoothProgressDrawable but for circular layoutlibrary/src/main/res/values/attrs.xml— XML attribute definitions for SmoothProgressBar customization; defines all publicly configurable properties via XMLlibrary-circular/src/main/res/values/attrs.xml— XML attribute definitions for CircularProgressBar; mirrors horizontal variant's customization interfacesample/src/main/java/fr/castorflex/android/smoothprogressbar/sample/MainActivity.java— Primary sample application demonstrating both horizontal and circular progress bar usage patterns
🛠️How to make changes
Add Custom Animation Colors
- Edit library/src/main/res/values/attrs.xml to add new color attributes if needed, or use existing <attr name="spb_color"> (
library/src/main/res/values/attrs.xml) - In your layout XML, declare the SmoothProgressBar widget with app:spb_color="@color/your_color" and app:spb_color_2, app:spb_color_3, app:spb_color_4 for additional colors (
sample/src/main/res/layout/activity_main.xml) - If programmatically changing colors, cast the drawable and call setColors(int[]) on SmoothProgressDrawable instance (
library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java)
Create a New Progress Bar Variant
- Create a new module directory parallel to library/ and library-circular/, set up build.gradle using library-circular/build.gradle as template (
library-circular/build.gradle) - Create your custom Drawable extending the pattern in CircularProgressDrawable, implementing animation via ObjectAnimator (
library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.java) - Create your Widget class (extends ProgressBar or View) following SmoothProgressBar pattern, instantiating and managing your custom drawable (
library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java) - Define XML attributes in your module's src/main/res/values/attrs.xml following the existing pattern (
library-circular/src/main/res/values/attrs.xml) - Add your module to settings.gradle (
settings.gradle)
Customize Animation Speed & Easing
- Define new attributes in library/src/main/res/values/attrs.xml for animation duration if not using default spb_duration (
library/src/main/res/values/attrs.xml) - In SmoothProgressBar.java, modify the ObjectAnimator setup duration and interpolator when creating the animation (
library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressBar.java) - For circular variant, apply custom FastOutSlowInInterpolator or LookupTableInterpolator in CircularProgressDrawable initialization (
library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressDrawable.java)
Implement Power-Saving Behavior
- Create a new Delegate class implementing PBDelegate interface, following the pattern in PowerSaveModeDelegate.java (
library-circular/src/main/java/fr.castorflex.android.circularprogressbar/PowerSaveModeDelegate.java) - In CircularProgressBar.setDelegate() method or constructor, instantiate and inject your delegate before startAnimation() (
library-circular/src/main/java/fr.castorflex.android.circularprogressbar/CircularProgressBar.java) - Override draw/onDraw behavior in your delegate to reduce frame updates or pause animation under battery conditions (
library-circular/src/main/java/fr.castorflex.android.circularprogressbar/DefaultDelegate.java)
🔧Why these technologies
- undefined — undefined
🪤Traps & gotchas
No hidden configuration or environment variables required. Gradle wrapper (gradlew) is included, so no Gradle install needed. One non-obvious detail: library-circular/ requires API 14+ due to ObjectAnimator usage (see build.gradle minSdk), while library/ supports API 7+—mixing them in projects with targetSdk=7 will cause issues. PowerSaveModeDelegate suggests battery-mode animation fallback logic exists but is not explicitly documented in README.
🏗️Architecture
💡Concepts to learn
- Android Drawable Animation (ValueAnimator) — SmoothProgressBar replaces frame-based animation (AnimationDrawable) with property-based ValueAnimator for smooth, continuous rotation and scaling—understanding this is critical to modifying animation behavior
- Interpolator and easing functions — The library implements FastOutSlowIn (Material Design standard) via LookupTableInterpolator for smooth acceleration curves—modifying animation feel requires understanding interpolator design
- Canvas drawing and path clipping — SmoothProgressDrawable and CircularProgressDrawable use Canvas.drawArc() and custom path rendering—understanding Canvas API is essential for tweaking visual appearance
- Strategy pattern (PBDelegate) — CircularProgressBar uses PBDelegate to swap animation implementations (DefaultDelegate vs PowerSaveModeDelegate)—this pattern allows runtime behavior switching for battery optimization
- Android View theming and attribute resolution — The library heavily uses TypedArray to parse XML attributes (attrs.xml) and merge with defaults—critical for allowing customization via layout XML
- Hardware acceleration and drawing performance — Smooth animation at 60fps requires understanding hardware-accelerated rendering vs software rendering—the PowerSaveModeDelegate suggests this was a performance consideration
- Gradle multi-module builds — Project has two separate modules (library/ and library-circular/) with independent build.gradle and versions—understanding module separation and publishing is key to modifying the build
🔗Related repos
hdodenhof/CircleImageView— Popular Android library for custom ImageView—similar single-purpose, well-polished approach to solving a common UI need with custom Drawablessquare/okhttp— Ecosystem companion—OkHttp is often paired with progress indicators in Android apps for network request visualizationmaterial-components/material-components-android— Shares the Material Design animation philosophy (FastOutSlowIn interpolator used here)—modern alternative for newer minSdk projectsfacebook/fresco— Image loading library that uses custom progress drawables—shows real-world usage pattern for integrating SmoothProgressBargoogle/material-design-icons— Provides Material Design baseline that inspired the smooth animation aesthetic of this library
🪄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 unit tests for SmoothProgressDrawable and CircularProgressDrawable
The repo has no visible test files despite having complex drawable implementations (SmoothProgressDrawable.java and CircularProgressDrawable.java) with animation logic, interpolators, and color management. Testing these core components would catch regressions in animation timing, color transitions, and drawable lifecycle.
- [ ] Create library/src/test/java/fr/castorflex/android/smoothprogressbar/ directory structure
- [ ] Add unit tests for SmoothProgressDrawable covering start(), stop(), setColor() methods
- [ ] Add unit tests for CircularProgressDrawable covering animation callbacks and delegate pattern
- [ ] Add instrumented tests (androidTest) for rendering and animation frame validation
- [ ] Update build.gradle files to include testImplementation for JUnit and Mockito
Migrate from deprecated support-annotations to AndroidX
The build.gradle shows dependency on 'com.android.support:support-annotations:26.0.1' which is deprecated and no longer maintained. The codebase uses annotations throughout (library/src/main/java) but hasn't migrated to AndroidX equivalents. This blocks modern app integration and creates maintenance risk.
- [ ] Update build.gradle to replace 'com.android.support:support-annotations:26.0.1' with 'androidx.annotation:annotation:1.x.x'
- [ ] Update library/build.gradle and library-circular/build.gradle compileSdkVersion and targetSdkVersion to API 31+
- [ ] Replace all 'android.support' imports with 'androidx' imports in library/src/main/java and library-circular/src/main/java
- [ ] Update AndroidManifest.xml files to remove any deprecated support library references
- [ ] Update .travis.yml to test against modern Android SDK versions
Add GitHub Actions CI workflow to replace Travis CI
The repo uses outdated .travis.yml configuration. GitHub Actions is now the standard CI/CD platform with better integration, faster execution, and no external dependencies. This would enable automated testing, lint checks, and build verification on pull requests.
- [ ] Create .github/workflows/android-ci.yml with jobs for build, lint, and unit tests
- [ ] Add gradle build step: './gradlew build' for all modules (library, library-circular, sample)
- [ ] Add lint step: './gradlew lint' to validate code quality across library modules
- [ ] Configure matrix testing for multiple API levels (minSdk=7 for horizontal, minSdk=14 for circular)
- [ ] Archive build artifacts and test reports for PR review
- [ ] Update README.md to replace Travis CI badge with GitHub Actions badge
🌿Good first issues
- Add unit tests for SmoothProgressDrawable animation calculations (draw() method, color section logic) to library/src/test/—currently no test directory visible, leaving animation math unvalidated
- Document the interpolator selection in FastOutSlowInInterpolator.java and LookupTableInterpolator.java with comments explaining why Material Design's FastOutSlowIn was chosen and performance tradeoffs of lookup tables
- Create a comparison demo in README showing before/after screenshots of SmoothProgressBar vs default Android ProgressBar, with specific performance metrics (frame rate, CPU usage) to justify the custom implementation
⭐Top contributors
Click to expand
Top contributors
- @castorflex — 86 commits
- [@Carsten H](https://github.com/Carsten H) — 2 commits
- @friederbluemle — 2 commits
- @i906 — 2 commits
- @ardacebi — 1 commits
📝Recent commits
Click to expand
Recent commits
c620eac— Update CI badges (castorflex)ca7d212— Update README.md (castorflex)47fb84a— Merge pull request #102 from ardacebi/patch-1 (castorflex)d75d36e— Replacement of "compile" with "implementation" (ardacebi)29fe004— Prepare 1.3.0 circular release (castorflex)fd5655c— Update android deps and target version to Oreo (castorflex)45f550e— Add some finals and UiThread annotations (castorflex)5ec672a— Fix travis build (castorflex)417db0f— Code cleaning, modify some public to private/package access (castorflex)f490e07— Fix Nougat rotation issue (castorflex)
🔒Security observations
The SmoothProgressBar repository has significant security concerns, primarily stemming from severely outdated build tools and dependencies. The use of Gradle 3.0.0-beta3 (from 2017) is critical and must be updated immediately. The deprecated Android Support Library version 26.0.1 needs migration to AndroidX. The inclusion of mavenLocal() repository introduces supply chain risks. Overall, the project requires urgent updates to modern tooling, dependency management, and security best practices to be suitable for production use.
- High · Outdated Gradle Build Tool Version —
build.gradle - classpath 'com.android.tools.build:gradle:3.0.0-beta3'. The build.gradle uses Gradle 3.0.0-beta3, which is a beta version from 2017 and contains multiple known security vulnerabilities. Beta versions should never be used in production, and this version is significantly outdated with no security patches. Fix: Update to the latest stable Gradle version (currently 8.x). Use a stable release version, never beta versions. Run 'gradle wrapper --gradle-version X.X.X' to update safely. - High · Outdated Support Library Dependency —
build.gradle - libraries annotations: 'com.android.support:support-annotations:26.0.1'. Support annotations library version 26.0.1 is from 2017 and is deprecated. The Android Support Library has been superseded by AndroidX. This version likely contains unpatched security and stability issues. Fix: Migrate to AndroidX. Replace with 'androidx.annotation:annotation:1.x.x' (latest stable version). This is a mandatory migration for modern Android development. - Medium · Insecure Repository Configuration —
build.gradle - mavenLocal() in repositories. The build.gradle includes 'mavenLocal()' in both buildscript and allprojects sections. This can expose the build to locally cached artifacts that may have been compromised or modified, especially in shared development environments. Fix: Remove mavenLocal() from production builds. If local development artifacts are needed, use local file repositories with restricted access or a private artifact repository with authentication. - Medium · Unencrypted HTTP Repository Access —
build.gradle - repositories configuration. The maven.google.com repository is accessed via HTTPS, which is good. However, jcenter() and mavenCentral() should be verified to use HTTPS. Ensure all repository URLs use HTTPS to prevent man-in-the-middle attacks during dependency downloads. Fix: Explicitly specify HTTPS for all repositories. Example: 'maven { url 'https://repo1.maven.org/maven2/' }' for Maven Central. Verify that jcenter() and mavenCentral() use HTTPS by default in your Gradle version. - Low · No Dependency Verification —
build.gradle - no dependency verification configuration. The project lacks dependency verification mechanisms (dependency locking, checksum verification, or signature validation). This could allow supply chain attacks where compromised dependencies are downloaded. Fix: Implement Gradle dependency verification using 'gradle/verification-metadata.xml' or enable lock file generation with '--write-locks'. Consider using a software composition analysis (SCA) tool like Dependabot or Snyk. - Low · Missing Security Headers in Configuration —
build.gradle and individual module build.gradle files. The project lacks security-related gradle configurations such as minSdkVersion enforcement, security-provider updates, or proguard/R8 obfuscation rules visible in the provided snippets. Fix: Ensure all modules specify appropriate minSdkVersion, compile targets. Enable R8/ProGuard obfuscation and shrinking in release builds. Consider adding security-provider dependency for cryptographic updates.
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.