Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cctanfujun/ProgressRoundButton

A DownloadProgressButton with Animation for Android
https://github.com/cctanfujun/ProgressRoundButton

android gradient

Last synced: about 1 month ago
JSON representation

A DownloadProgressButton with Animation for Android

Awesome Lists containing this project

README

        

# ProgressRoundButton [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ProgressRoundButton-green.svg?style=flat)](https://android-arsenal.com/details/1/2660)

A Smooth Download Button with Progress.

## Demo

![demo](./img/Oct-27-2016 10-39-17.gif)

## Usage

### step1

#### gradle

```groovy
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.xiaochendev.progressroundbtn:library:2.0.0'
}
```
### step2

you can define the button in xml like this:

```xml

```
### advanced
* If you want shadow and press effect,please use `AnimButtonLayout` instead of `AnimDownloadProgressButton` :

```xml

```

* You can also implement your own `ButtonController`,so that you can controll gradient effect;

The Customized properties are in the follow table:
git

| Property | Format | Default |
| ------------- |:-------------:| :-----:|
|progressbtn_radius |float |half of the button height |
|progressbtn_background_color|color | #6699ff |
|progressbtn_background_second_color|color|Color.LTGRAY|
|progressbtn_text_color|color|progressbtn_background_color|
|progressbtn_text_covercolor|color|Color.WHITE|
|progressbtn_enable_press|boolean|false|
|progressbtn_enable_gradient|boolean|false|


The follow picture make a clear explanation:

![show](http://ww4.sinaimg.cn/large/0060lm7Tgw1ex1yr2b9xjj30eg0go75n.jpg)

open gradient

![gradient](http://ww4.sinaimg.cn/mw690/6ccf7929gw1f96m1ejk01j208m01mjra.jpg)

use `AnimButtonLayout`

![shadow](http://ww2.sinaimg.cn/mw690/6ccf7929gw1f96m1f759gj208h01taa0.jpg)

## Version

* 2.0.0
Now you can use press effect;
Now you can use gradient effect;
Add AnimButtomLayout with shadow ,when you press the button will be small;

* 1.1.0
Fix the bug when setProgressText("something",100),first tiem getProgress() return 0;

* 1.0.0
Now you can set text size;
Add Method removeAllAnim() to avoid memory leak;

* 0.9.1

## About me

I am a developer in China,If you have any idea about this project,please [contact me](mailto:[email protected])
,Thank you!

## 晓晨Android组
这个是我的公众号,如果你有 Android 开发方面问题可以和我一起讨论,我每周或者每两周会发一两篇原创的Android文章,谢谢支持!

![xiaochen588189](./img/wechat.jpg)

## License

Copyright 2015 cctanfujun

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

http://www.apache.org/licenses/LICENSE-2.0

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.