explaingit

castorflex/smoothprogressbar

4,510JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An Android library that replaces the plain default loading bar with smooth, customizable horizontal or circular progress animations, added to any project via a single Gradle dependency line.

Mindmap

mindmap
  root((SmoothProgressBar))
    What it does
      Nicer loading bars
      Horizontal sliding bar
      Circular spinner
    Customization
      Color and speed
      Stroke width
      Section count
      Reverse direction
    Setup
      Single Gradle line
      XML layout or Java code
      Theme style option
    Requirements
      Android API 7 plus
      Gradle build
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Replace the default Android loading spinner with a smooth multi-color horizontal progress bar using one Gradle dependency

USE CASE 2

Show a circular indeterminate progress indicator that matches your app's color scheme

USE CASE 3

Customize animation speed, stroke width, and number of sliding sections without writing custom drawing code

USE CASE 4

Apply the progress bar globally via an Android theme so every screen in your app uses the same custom style

Tech stack

JavaAndroidGradle

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial projects, as long as you keep the copyright notice.

In plain English

This is an Android library that provides nicer-looking loading indicators for mobile apps. When an Android app is doing something in the background and wants to show the user that work is happening, it typically shows a spinning or sliding progress bar. The standard Android progress bar looks plain and dated. This library replaces it with a smoother, more customizable version. It comes in two forms. The first is a horizontal bar that slides across the screen, similar to the loading animation seen in the Google Now app. The second is a circular spinner. Both are indeterminate, meaning they do not show a percentage or specific amount of progress, just the fact that something is happening. You can control things like color, speed, stroke width, the number of sliding sections in the horizontal bar, and whether the animation mirrors or reverses direction. Adding it to an Android project is done by including a single line in the Gradle build file, which is the standard way Android developers add third-party libraries. No manual downloading is required. The library supports Android API level 7 and above for the horizontal bar and API level 14 and above for the circular variant. Once added, developers can use it in a few ways: by dropping the custom view directly into a layout XML file and setting properties there, by defining a style in a theme file and applying it globally, or by constructing the progress drawable in Java code and attaching it to an existing progress bar widget. Multiple colors can be assigned to a single bar, cycling through them as it animates, similar to what some Google apps display. The library is licensed under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
Add SmoothProgressBar to my Android app and show a horizontal sliding progress bar in three colors that cycles while data is loading.
Prompt 2
How do I add SmoothProgressBar to my app's XML layout file and control its color and speed through XML attributes?
Prompt 3
I want SmoothProgressBar to use my app's brand colors globally without configuring it on each screen. How do I set it as a theme style in Android?
Prompt 4
I need a circular progress bar instead of the horizontal bar in SmoothProgressBar. Which class do I use and how do I add it to a layout?
Prompt 5
What is the minimum Android API level supported by SmoothProgressBar and does the circular variant have different requirements than the horizontal one?
Open on GitHub → Explain another repo

← castorflex on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.