ProgressButton is a custom progress indicator with a tiny footprint. The default implementation provides a pin progress button as seen on the Android design site.
ProgressButton in your layout files.
Instantiate an instance of
ProgressButton with a context.
ProgressButton button = new ProgressButton(context);
ProgressButton is highly customizable. You can supply your own resources to style it and give it a unique look. As a subclass of
CompoundButton, you can use any if those attributes as well. Custom attributes defined for ProgressButton include:
progress : The current progress to display as an
max : The maximum progress that can be displayed an
circleColor : The color to display the progress background
progressColor : The color to indicate the progress
Drawable displayed when the button is unpinned
Drawable displayed when the button is pinned
Drawable that acts as the shadow of the button
innerSize : Area inside the view that should be
filled with the progressColor
boolean start the button
in an animating mode
animationStripWidth : Width of the animation bar
animationSpeed : The progress with which each frame
of the animation appears to 'jump'
animationDelay : Delay before each animation frame.
pinned : Whether the button is pinned or not
Look under the
/samples folder to see an example of how to use these attributes. The corresponding app is available on the Play Store.
The source code to
ProgressButton, its samples, and this website is available on GitHub.
<version>(insert latest version)</version>
compile 'com.f2prateek.progressbutton:progressbutton:(insert latest version)@aar'
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running
mvn clean verify.
Copyright 2013 Prateek Srivastava
Copyright 2012 Roman Nurik
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.