Android Process Buttons

Android Process Buttons

Released 4 years ago , Last update 4 years ago

Custom android button which can indicate progress.

I was investigating a solution to replace Dialog Fragment, as indicator to user that something is happening and came up with idea of displaying progress on button.

Latest version include 3 process buttons:

  • Action Process Button (specific integer and infinity progress)
  • Generate Process Button (specific integer progress)
  • Submit Process Button (specific integer progress)

Please see https://github.com/dmytrodanylyk/android-process-buton for additional details and documentation.

4.0
  • 5 0
  • 4 1
  • 3 0
  • 2 0
  • 1 0
1 Reviews Read Reviews

Pricing

14 day 14-day money-back guarantee

FREE

MIT license

The MIT license is an open-source license.

Need custom services for this product? Get a quote

Setup / installation

Flat Button

FlatButton - base class which can be used to display flat button, extends Button. Configurable by two xml attributes:

<com.dd.processbutton.FlatButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Flat Button"
    android:textColor="@android:color/white"
    custom:colorNormal="@android:color/holo_blue_light"
    custom:colorPressed="@android:color/holo_blue_dark" />

Process Button

ProcessButton - abstract class extends FlatButton , behavior is very similar to android ProgressBar. Main point is to use setProgress method to set progress from 0 to 100.

Action Process Button

Declare ActionProcessButton inside your 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="@string/Sign_in"
    android:textColor="@android:color/white"
    android:textSize="18sp"
    custom:colorComplete="@color/green_complete"
    custom:colorNormal="@color/blue_normal"
    custom:colorPressed="@color/blue_pressed"
    custom:colorProgress="@color/purple_progress"
    custom:completeText="@string/Success"
    custom:progressText="@string/Loading" />

<!--background color which will be displayed when loading is complete-->
custom:colorComplete
<!--text which will be displayed when loading is complete-->
custom:completeText
<!--loading color indicator-->
custom:colorProgress
<!--text which will be displayed when loading is in progress-->
custom:progressText

Control it via Java code

ActionProcessButton btnSignIn = (ActionProcessButton) findViewById(R.id.btnSignIn);
btnSignIn.setMode(ActionProcessButton.Mode.PROGRESS);

// no progress
button.setProgress(0);
// progressDrawable cover 50% of button width, progressText is shown
button.setProgress(50);
// progressDrawable cover 75% of button width, progressText is shown
button.setProgress(75);
// completeColor & completeText is shown
button.setProgress(100);

// you can display endless google like progress indicator
btnSignIn.setMode(ActionProcessButton.Mode.PROGRESS);
// set progress > 0 to start progress indicator animation
button.setProgress(1);
License » MIT license Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

or Get a quote

for customization or integration services


Or enter your name and Email
No comments have been posted yet.