Android Buttons With Built-in Progress Meters.

Last update: May 10, 2022

Description Maven Central Android Arsenal

Android Buttons With Built-in Progress Meters.

Wiki

Integration

The lib is available on Maven Central, you can find it with Gradle, please

dependencies {
    compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
}

Sample

Android app on Google Play DevAppsDirect

License

The MIT License (MIT)

Copyright (c) 2014 Danylyk Dmytro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Analytics

GitHub

https://github.com/dmytrodanylyk/android-process-button
Comments
  • 1. Progress color always matching Normal color

    This is my button

        <com.dd.processbutton.iml.ActionProcessButton
            pb:pb_colorPressed="@android:color/transparent"
            pb:pb_colorComplete="@color/blue"
            pb:pb_textComplete="@string/complete"
            pb:pb_colorError="@color/red"
            pb:pb_textError="@string/error"
            pb:pb_colorProgress="@color/blue"
            pb:pb_textProgress="@string/progress"
            pb:pb_colorNormal="@color/green"
            android:text="@string/confirm_idle" />
    

    the progress state shows as green for some reason. I'm not setting the colors again in code or anything.

    Reviewed by pakoito at 2015-02-26 17:33
  • 2. Inflate Exception in xml

    Hai.. I am trying to run your sample project. I got this error. Please help me solve this issue.

    07-15 11:26:24.416: E/AndroidRuntime(3195): FATAL EXCEPTION: main
    07-15 11:26:24.416: E/AndroidRuntime(3195): Process: com.example.processbutton, PID: 3195
    07-15 11:26:24.416: E/AndroidRuntime(3195): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.processbutton/com.example.processbutton.MainActivity}: android.view.InflateException: Binary XML file line #25: Error inflating class com.dd.processbutton.iml.SubmitProcessButton
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread.access$800(ActivityThread.java:139)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.os.Handler.dispatchMessage(Handler.java:102)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.os.Looper.loop(Looper.java:136)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread.main(ActivityThread.java:5086)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at java.lang.reflect.Method.invokeNative(Native Method)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at java.lang.reflect.Method.invoke(Method.java:515)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at dalvik.system.NativeStart.main(Native Method)
    07-15 11:26:24.416: E/AndroidRuntime(3195): Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class com.dd.processbutton.iml.SubmitProcessButton
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.createView(LayoutInflater.java:620)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.Activity.setContentView(Activity.java:1937)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.example.processbutton.MainActivity.onCreate(MainActivity.java:16)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.Activity.performCreate(Activity.java:5248)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     ... 11 more
    07-15 11:26:24.416: E/AndroidRuntime(3195): Caused by: java.lang.reflect.InvocationTargetException
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at java.lang.reflect.Constructor.constructNative(Native Method)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at android.view.LayoutInflater.createView(LayoutInflater.java:594)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     ... 23 more
    07-15 11:26:24.416: E/AndroidRuntime(3195): Caused by: java.lang.NoClassDefFoundError: com.dd.processbutton.R$styleable
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.dd.processbutton.FlatButton.initAttributes(FlatButton.java:45)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.dd.processbutton.FlatButton.init(FlatButton.java:38)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.dd.processbutton.FlatButton.<init>(FlatButton.java:27)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.dd.processbutton.ProcessButton.<init>(ProcessButton.java:31)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     at com.dd.processbutton.iml.SubmitProcessButton.<init>(SubmitProcessButton.java:40)
    07-15 11:26:24.416: E/AndroidRuntime(3195):     ... 26 more
    
    Reviewed by ram-ap at 2014-07-15 07:37
  • 3. Rendering problem with Android Studio

    Hi!

    Android Studio throws the next error rendering ActionProcessButton:

    Rendering Problems

    The following classes could not be instantiated: - com.dd.processbutton.iml.ActionProcessButton (Open Class, Show Exception) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE

    Exception Details

    java.lang.AssertionError    at android.content.res.BridgeResources.getDimension(BridgeResources.java:335) at com.dd.processbutton.FlatButton.getDimension(FlatButton.java:103) at com.dd.processbutton.FlatButton.initAttributes(FlatButton.java:52) at com.dd.processbutton.FlatButton.init(FlatButton.java:38) at com.dd.processbutton.FlatButton.(FlatButton.java:27) at com.dd.processbutton.ProcessButton.(ProcessButton.java:31) at com.dd.processbutton.iml.ActionProcessButton.(ActionProcessButton.java:64) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)    at android.view.LayoutInflater.inflate(LayoutInflater.java:385)

    It's just the preview, on runtime works fine.

    Any ideas?

    thanks!

    Reviewed by fxkjd at 2015-01-26 20:15
  • 4. implement error status and reset to default style

    Hi, I think that the library should implement an error state (when a login has been failed by an user or password error), and a reset method for return to initial style (text and drawable).

    Sorry my english is bad.

    Reviewed by ClarkXP at 2014-05-15 22:52
  • 5. I dont see ProgressGenerator

    I add library already but i dont see ProgressGenerator http://b5430300039.2th.asia/1.png http://b5430300039.2th.asia/2.PNG what are doing? Thank you vary much.

    Reviewed by ipBill at 2014-07-31 16:26
  • 6. README

    Hello, why does your README say: compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.3 but your release says: compile 'com.github.dmytrodanylyk.android-process-button:library:0.0.7

    Igor

    Reviewed by IgorGanapolsky at 2015-05-06 20:51
  • 7. Gradle: Could not find element /manifest/application.

    Hi,

    I've been trying to add this library as a gradle dependency of my project, but gradle is enable to merge manifest files correctly, giving me the above error.

    I've been looking around and it seems that even for a library project, the associated AndroidManifest.xml needs an empty

    This is a workaround as stated here: https://groups.google.com/forum/#!topic/adt-dev/wFnAOAmYCSs

    I'm not sure about what to do about it, either wait for a fix in Gradle, or publish a new version with the missing tag. This is up to you guys.

    I'm using IntellijIDEA 13.1.4 with the included gradle wrapper plugin.

    Cheers,

    AL.

    PS: if by any chance I'm missing something, any help will be appreciated

    Reviewed by lisional at 2014-07-28 23:19
  • 8. Re-enabling button

    I have a ActionProcessButton in my layout. Upon the onComplete function, I check if the button has an 'error' message. If it encounters an error message, it re-enables itself. However, upon re-enabling the button and setting the progress back to 0, the button does not animate when click. Is this the correct way to re-enable the button?

                public void onComplete() {
                    if (!bSendPin.getText().toString().equals("Success")) {
                        bSendPin.setEnabled(true);
                        bSendPin.setProgress(0);
                    } else {
                        //SUCCESS
                        Toast.makeText(MainActivity.this, "SUCCESS", Toast.LENGTH_SHORT).show();
                    }
                }
    
    Reviewed by shaunidiot at 2014-06-23 06:05
  • 9. Owner, where are you?

    Hey @dmytrodanylyk - do you need help with this repo? There are bunch of good pull requests waiting and I would prefer some of them are merged to fix bugs and have unified base version.

    Let me know if you need help with administration.

    Reviewed by rockstardev at 2016-11-15 22:48
  • 10. Question: re-enable button after tot secs

    I'm in the situation where I do a http request. If I get an error, I set the progress value to -1 showing the error button. However, I would like to know how it's possible re enable the button (progress = 0) after a certain amount of seconds. Does the library provide this mechanism? If not, what could you suggest? Thanks!!

    Reviewed by brunano21 at 2015-10-10 15:42
  • 11. mNormalText

    There is bug when press the button the button will show up the processing text and until in some situation i need to manually change the state to normal and the Normal Text does not come back up instead it shows the default text that is defined in the xml. Are there a better way to show do the setNormalText that will able to be programmed dynamically from manually changes?

    Reviewed by jjhesk at 2015-03-12 06:21
  • 12. Binary XML file line #212: Binary XML file line #212: Error inflating class com.dd.CircularProgressButton

    Im also getting same error im using android studio

    here is the java file

    it is showing me error on setContentView

    @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_personal_data);

    Process: com.teepe.teepe, PID: 13426 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.teepe.teepe/com.teepe.teepe.KYC.personalData}: android.view.InflateException: Binary XML file line #212: Binary XML file line #212: Error inflating class com.dd.CircularProgressButton at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: android.view.InflateException: Binary XML file line #212: Binary XML file line #212: Error inflating class com.dd.CircularProgressButton Caused by: android.view.InflateException: Binary XML file line #212: Error inflating class com.dd.CircularProgressButton

    Reviewed by chigup at 2019-06-19 11:35
  • 13. Action Process Button will show loading progress animation only on first time

    The button loading animation will work for only one click , I think we should add mProgress = 0;

      public void start(final ProcessButton button) {
            final Handler handler = new Handler();
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mProgress += 10;
                    button.setProgress(mProgress);
                    if (mProgress < 100) {
                        handler.postDelayed(this, generateDelay());
                    } else {
                        mListener.onComplete();
                        mProgress = 0;
                    }
                }
            }, generateDelay());
        }
    
    Reviewed by Badranh at 2018-07-30 09:08
  • 14. The text don't change

    Hi,

    I make an android application and I use your process button for the sign up / sign in. When I push the button, the animation start and the color change. But the text don't change, I have always my basic text that I defined in the layout. However, I set all custom text in the layout :

    <com.dd.processbutton.iml.ActionProcessButton android:id="@+id/btnSignIn" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:text="Sign_in" android:textColor="@android:color/white" android:textSize="18sp" custom:pb_colorComplete="@color/green_complete" custom:pb_colorNormal="@color/blue_normal" custom:pb_colorPressed="@color/blue_pressed" custom:pb_colorProgress="@color/purple_progress" custom:pb_textComplete="Success" custom:pb_textProgress="Loading" custom:pb_textError="Error" custom:pb_colorError="@color/red_error" />

    In this example, I should have the text "Loading" when I push the button, but it doesn't work.

    Do you have any ideas about this ?

    Thank you

    Reviewed by fjoalland at 2017-03-23 18:12
  • 15. Start Progress start after task complete ?

    hi , I used action button to display progress while sending mail progress display after task is finished so it takes time to wait while nothing appear I need to display progress while task is running, I want the progress start after click on button and finish after task complete, how can I make this thanks

    Reviewed by raniaopenscope at 2017-03-05 08:33
SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.
SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.

SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.

Apr 8, 2022
Android Circular Progress Button
Android Circular Progress Button

?? Before using this library, read information below ?? This library is not more supported. If you want to add new feature or fix a bug, grab source

May 17, 2022
Android Floating ActionButton with a progress indicator ring
Android Floating ActionButton with a progress indicator ring

FabProgress Android Circular floating action button with intergrated progress indicator ring As per material design docs Demo: Demo apk HOW TO ADD TO

May 12, 2022
Material progress circle around any FloatingActionButton. 100% Guidelines.
Material progress circle around any FloatingActionButton. 100% Guidelines.

FABProgressCircle Android library to provide a material progress circle around your FloatingActionButton. This component is compatible with any existe

May 17, 2022
Base on android-process-button this is the advanced version of the android-process-button.
Base on android-process-button this is the advanced version of the android-process-button.

Rock Button release log Base on android-process-button this is the advanced version of the android-process-button ##Main Features ActionProcessButton

Apr 22, 2022
Circle button widget for Android

DEPRECATED This library is deprecated and no new development is taking place. Consider using a FAB(Floating action button) instead. E.g. the Android D

May 16, 2022
FButton - a flat button library for Android
FButton - a flat button library for Android

FButton FButton is a custom Button of Android with "Flat UI" concept. FButton's design get inspiration from designmono. This library is very small and

Apr 11, 2022
Android button which moves in eight direction.
Android button which moves in eight direction.

Moving Button Android button which moves in eight direction. Preview Sample Demo You can download demo movie file here : demo.mov It's also on Youtube

Feb 15, 2022
Button for android with animations for transition and error states.
Button for android with animations for transition and error states.

Transition Button Android Preview Expand animation: Shake animation: Installation Gradle dependencies { implementation 'com.royrodriguez:transitionbu

May 14, 2022
AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.
AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.

AwesomeSwitch AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard swi

May 3, 2022
[] Android floating action button
[] Android floating action button

DEPRECATED Use the FloatingActionButton from the support library instead. FloatingActionButton Description Android floating action button which reacts

May 17, 2022
Floating Action Button for Android based on Material Design specification
Floating Action Button for Android based on Material Design specification

FloatingActionButton Yet another library for drawing Material Design promoted actions. Features Support for normal 56dp and mini 40dp buttons. Customi

May 20, 2022
Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

May 18, 2022
ToggleButton Widget For Android Dev
ToggleButton Widget For Android Dev

ToggleButton ToggleButton Widget For Android Developers @Deprecated !!!项目已经停止维护,新项目移至https://github.com/zcweng/SwitchButton !!! How To Use xml

May 8, 2022
👏 The Medium's Clapping Effect developed in Android
👏 The Medium's Clapping Effect developed in Android

?? MediumClap-Android Built with ❤︎ by Wajahat Karim and contributors A Custom Floating Action Button (FAB) library like clapping effect on Medium ??

May 12, 2022
[] An Android library for an expandable button menu
[] An Android library for an expandable button menu

ExpandableButtonMenu ExpandableButtonMenu is an Android library which implements an expandable button that can be used as a substitute of a fixed size

Aug 16, 2021
SwitchButton 是 Android 上的一个开关按钮控件 【Deprecated】【Stop maintenance】
SwitchButton 是 Android 上的一个开关按钮控件 【Deprecated】【Stop maintenance】

SwitchButton 【Deprecated】【Stop maintenance】停止维护了,推荐使用:https://github.com/zcweng/SwitchButton SwitchButton 是 Android 上的一个开关按钮控件 示例 APP 扫描二维码或点我下载 特性 支持

Feb 18, 2022
This is a UI lib for Android. Effects like shining.
This is a UI lib for Android. Effects like shining.

ShineButton This is a UI lib for Android. Effects like shining. Usage shineButton = (ShineButton) findViewById(R.id.shine_button); shineButton.init(

May 21, 2022
A lightweight iOS switch view style for Android
A lightweight iOS switch view style for Android

iOS-SwitchView A lightweight iOS switch view style for Android Usage Add SwitchView into xml layout <vn.luongvo.widget.iosswitchview.SwitchView an

May 1, 2022