/ Button

Beautiful Fancy Button Loading

Beautiful Fancy Button Loading

ButtonLoading

Beautiful Fancy Button Loading.

Usage:

Step 1:

Add JitPack repository in your root build.gradle at the end of repositories.

allprojects {
    repositories {
	    ...
	    maven { url 'https://jitpack.io' }
    }
}

Add dependency in your app level build.gradle.

dependencies {
      compile 'com.github.rasoulmiri:buttonloading:v1.0.8'
}

Step 2:

use in layout xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    
        //...
  
        <io.rmiri.buttonloading.ButtonLoading
            android:layout_width="match_parent"
            android:layout_height="48dp"
            app:BL_backgroundColor="#80ffffff"
            app:BL_circleColor="#00AFEF"
            app:BL_circleColorSecond="#8000AFEF"
            app:BL_enable="true"
            app:BL_stateShow="normal"
            app:BL_text="Login"
            app:BL_textColor="#FFFFFF"
            app:BL_textSize="14sp" />

    
</RelativeLayout>

Step 3:

buttonLoading.setOnButtonLoadingListener(new ButtonLoading.OnButtonLoadingListener() {
            @Override
            public void onClick() {
           	//...
            }

            @Override
            public void onStart() {
               //...
            }

            @Override
            public void onFinish() {
               //...
            }
});

Configure XML

  • BL_backgroundColor
  • BL_circleColor color
  • BL_circleColorSecond
  • BL_stateShow: normal,animationStart,progress,animationFinish | default value is normal
  • BL_text: text button
  • BL_textColor
  • BL_textSize
  • BL_font: address font in assets. example: file in assetst > fonts > arial.ttf ==> fonts/arial.ttf

Note: Do not use the button in LinearLayout.

Contributing

You are welcome to contribute with issues, PRs or suggestions.

Other Project Me

Skeleton Android

Simple yet powerful skeleton animation for all view in android

alt tag

GitHub