Progress Button Android

Preview

Android Button that morphs into a loading progress bar.

  • Fully customizable in the XML
  • Really simple to use.
  • Makes your app looks cooler ?

Contents

Installation

Set up the dependency

  1. Add the mavenCentral() repository to your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		mavenCentral()
	}
}
  1. Add the LoadingButton dependency in the build.gradle:

implementation group: 'com.apachat', name: 'loadingbutton-android', version: '1.0.11'

Badge:

Maven Central

How to use

Animate and revert animation

Add the button in your layout file and customize it the way you like it.

<div class="highlight highlight-text-xml position-relative" data-snippet-clipboard-copy-content="
app:spinning_bar_width="4dp"
app:spinning_bar_color="#FFF"
app:spinning_bar_padding="6dp"
“>

<com.apachat.loadingbutton.core.customViews.CircularProgressButton
	android:id="@+id/btn_id"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:background="@drawable/circular_border_shape" />
	app:spinning_bar_width="4dp" <!-- Optional -->
	app:spinning_bar_color="#FFF" <!-- Optional -->
	app:spinning_bar_padding="6dp" <!-- Optional -->