All Projects → andreasagap → LoadingButtonLibrary

andreasagap / LoadingButtonLibrary

Licence: other
A loading button with animaton

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to LoadingButtonLibrary

fect
Minimalist UI components built on Vue-next
Stars: ✭ 352 (+1253.85%)
Mutual labels:  ui-library
GNUI
💅 Nordcloud's design system for SaaS products.
Stars: ✭ 21 (-19.23%)
Mutual labels:  ui-library
buttons tabbar
A Flutter package that implements a TabBar where each label is a toggle button.
Stars: ✭ 49 (+88.46%)
Mutual labels:  button
karang
React components library that implement Lalamove Design.
Stars: ✭ 14 (-46.15%)
Mutual labels:  ui-library
taroify
Taroify 是移动端组件库 Vant 的 Taro 版本,两者基于相同的视觉规范,提供一致的 API 接口,助力开发者快速搭建小程序应用。
Stars: ✭ 420 (+1515.38%)
Mutual labels:  ui-library
GlowButton
Beautify your layouts with glowing buttons. Support with a ⭐️ Contributions are welcome! 🙌
Stars: ✭ 54 (+107.69%)
Mutual labels:  button
TextViewPlus
an android library for setting custom font in xml layout
Stars: ✭ 27 (+3.85%)
Mutual labels:  button
GradientProgressView
一个简单的进度条控件
Stars: ✭ 15 (-42.31%)
Mutual labels:  progressview
AnimatedButton
UIButton subclass which performs animation on selection
Stars: ✭ 16 (-38.46%)
Mutual labels:  button
react-vant
React mobile UI Components base on Vant
Stars: ✭ 627 (+2311.54%)
Mutual labels:  ui-library
JPPack
A collection of VCL/LCL components for Delphi/Lazarus - buttons, panels, LinkLabel, ProgressBar, ColorComboBox, ColorListBox, Timer and other
Stars: ✭ 99 (+280.77%)
Mutual labels:  button
bemto-button
Foundation for complex reusable buttons in React
Stars: ✭ 18 (-30.77%)
Mutual labels:  button
jQuery-Awesome-Sosmed-Share-Button
Awesome Social Media Share Button With Share Count
Stars: ✭ 58 (+123.08%)
Mutual labels:  button
Rippleable
Ripple-Effecting Button in Swift, Inspired by material ios design.
Stars: ✭ 22 (-15.38%)
Mutual labels:  button
RevealLayout
揭示效果布局,可以指定2个子布局,以圆形揭示效果切换选中状态
Stars: ✭ 118 (+353.85%)
Mutual labels:  button
vuelongpress
Confirmation button for sensitive action, which requires to be hold for an amount of seconds
Stars: ✭ 75 (+188.46%)
Mutual labels:  button
react-native-radio-buttons-group
Simple, best and easy to use radio buttons for react native apps.
Stars: ✭ 145 (+457.69%)
Mutual labels:  button
carbon-components-svelte
Svelte implementation of the Carbon Design System
Stars: ✭ 1,615 (+6111.54%)
Mutual labels:  ui-library
ng2-go-top-button
A simple customizable go-top-button component for Angular projects.
Stars: ✭ 18 (-30.77%)
Mutual labels:  button
YBPulseButton
A Custom button that pulses.
Stars: ✭ 31 (+19.23%)
Mutual labels:  button

LoadingButton

License Build Status Android Arsenal

Demo

Usage

Step 1

Add it 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 {
  implementation 'com.github.andreasagap:LoadingButtonLibrary:v1.0'
}

Step 2

In xml

<android.support.constraint.ConstraintLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:id="@+id/root"
    android:layout_height="match_parent">

    <andreasagap.loadingbutton.ButtonLoading
        android:id="@+id/loadingbutton"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:BL_backgroundColor="#9c9b9999"
        app:BL_backgroundDisableColor="#00AFEF"
        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_textDisableColor="#000000"
        app:BL_textSize="16sp"/>

</android.support.constraint.ConstraintLayout>

In activity or fragment

ConstraintLayout root=findViewById(R.id.root);
ButtonLoading buttonLoading=findViewById(R.id.loadingbutton);
buttonLoading.setRoot(buttonLoading,this,root);
buttonLoading.setOnButtonLoadingListener(new ButtonLoading.OnButtonLoadingListener() {
    @Override
    public void onClick() {
                //...
    }
    @Override
    public void onStart() {

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

    }
});

End Progress

Just call buttonLoading.cancel(); and the button moves to its original position.
Without cancel(), the function onFinish() doesn't start.

Configure XML

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

Credits

This library was based on this repo: https://github.com/rasoulmiri/ButtonLoading 👏

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].