Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/race604/WaveLoading
A wave-like loading drawable
https://github.com/race604/WaveLoading
Last synced: about 2 months ago
JSON representation
A wave-like loading drawable
- Host: GitHub
- URL: https://github.com/race604/WaveLoading
- Owner: race604
- Created: 2016-12-07T08:07:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-05T22:20:21.000Z (over 6 years ago)
- Last Synced: 2024-10-15T23:45:37.497Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 1.27 MB
- Stars: 1,447
- Watchers: 29
- Forks: 173
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- -awesome-android-ui - WaveLoading - WaveLoading.gif" width="60%"> (Index `(light-weight pages)`)
- awesome-android-ui - WaveLoading - WaveLoading.gif" width="60%"> (Index `(light-weight pages)`)
- awesome-github-android-ui - WaveLoading - 能够提供波浪动画的Drawable (Wave)
- awesome-android-ui - WaveLoading - WaveLoading.gif" width="60%"> (Index)
README
#WaveLoading
This library provides a *wave loading* animation as a **Drawable**.
![screenshot](./screenshots/screenshot.gif)
## How to use
Add dependency:
```
compile 'com.race604.waveloading:library:1.1.1'
```Use in your project with only one line:
```
Drawable mWaveDrawable = new WaveDrawable(otherDrawable);// Use as common drawable
imageView.setImageDrawable(mWaveDrawable);
```Other configurable APIs:
* `public void setWaveAmplitude(int amplitude)`, set wave amplitude (in pixels)
* `public void setWaveLength(int length)`, set wave length (in pixels)
* `public void setWaveSpeed(int step)`, set wave move speed (in pixels)
* `public void setIndeterminate(boolean indeterminate)`, like progress bar, if run
in *indeterminate* mode, it'll increase water level over and over again, otherwise, you can
use `boolean setLevel(int level)` to set the water level, acting as loading progress.
* `public void setIndeterminateAnimator(ValueAnimator animator)`, set you customised animator
for wave loading animation in indeterminate mode.## License
MIT