explaingit

dmytrodanylyk/circular-progress-button

5,753JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An Android Java library that morphs a standard button into a spinning circular progress indicator and back, so you can show loading, success, and error states inside the button itself without adding a separate widget.

Mindmap

mindmap
  root((CircularProgressButton))
    Button States
      Normal button
      Loading spinner
      Success state
      Error state
    Setup
      JitPack repo
      Gradle dependency
      ProGuard rule
    Tech
      Java
      Android
      MIT license
    Related
      android-morphing-button
      Wiki and screenshots
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 a plain submit button in a login form with a CircularProgressButton so users see a spinner during authentication without a separate progress overlay.

USE CASE 2

Show success or error state directly inside the button after an API call completes by toggling the animation state programmatically.

USE CASE 3

Add morphing button animations to any Android screen to give users clear visual feedback that an action is in progress.

Tech stack

JavaAndroidGradle

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

This is an Android library that provides a button which can animate into a circular progress indicator. When a user taps the button, it morphs its shape from a standard rectangular button into a circle and displays a spinning progress arc, then can animate back to the button state or into a success or error state when the operation finishes. A short animated GIF in the README demonstrates the effect. The library is written in Java and is intended to be added to an Android project. It is available through JitPack, so you add a repository entry and a single dependency line to your Gradle build file to include it. If your project uses ProGuard to shrink and obfuscate the release build, the README includes a one-line rule to add to your ProGuard configuration so the animation does not break. The README is brief and does not go into detail about the full API, instead pointing to a wiki for screenshots and a user guide. The author also notes that an updated and extended version of this library exists under the name android-morphing-button, which offers additional morphing animations beyond the circular progress style. Contributions should be submitted as pull requests against the dev branch rather than the main branch. The library is released under the MIT license.

Copy-paste prompts

Prompt 1
Add the circular-progress-button library to my Android Gradle project via JitPack and show me how to create a button that spins while a Retrofit network request is in progress.
Prompt 2
Show me how to trigger the success and error states on a CircularProgressButton in Android Java after receiving an API response.
Prompt 3
How do I customize the stroke color, width, and animation speed of the circular progress arc in the circular-progress-button library?
Prompt 4
What ProGuard rule do I need to add to keep circular-progress-button animations working in a release build?
Open on GitHub → Explain another repo

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

Verify against the repo before relying on details.