https://github.com/samlss/peasloadingview
⭕A peas rotation loading view.
https://github.com/samlss/peasloadingview
android loadingview
Last synced: 11 months ago
JSON representation
⭕A peas rotation loading view.
- Host: GitHub
- URL: https://github.com/samlss/peasloadingview
- Owner: samlss
- License: mit
- Created: 2018-07-19T04:18:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T02:20:10.000Z (over 7 years ago)
- Last Synced: 2025-03-22T15:23:48.090Z (about 1 year ago)
- Topics: android, loadingview
- Language: Java
- Homepage:
- Size: 5.7 MB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PeasLoadingView
A peas ratationloading view(一个小豆豆旋转loading view).
[](https://github.com/samlss/PeasLoadingView) [](https://github.com/samlss/PeasLoadingView/blob/master/LICENSE) [](https://blog.csdn.net/Samlss)
* [中文](#%E4%B8%AD%E6%96%87)
* [English](#english)
* [License](#license)

## 中文
### 使用
在根目录的build.gradle添加这一句代码:
```
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
```
在app目录下的build.gradle添加依赖使用:
```
dependencies {
implementation 'com.github.samlss:PeasLoadingView:1.2'
}
```
布局中使用:
```
```
代码中使用:
```
peasLoadingView.start(); //开始动画
peasLoadingView.stop(); //结束动画
peasLoadingView.setPeasCount(7);//设置豆豆数量
peasLoadingView.setInterpolator(new LinearInterpolator()); //设置动画插值器
peasLoadingView.setPeasColors(new int[]{Color.RED, Color.WHITE, Color.GREEN, Color.BLUE, Color.YELLOW, Color.MAGENTA, Color.GRAY}); //设置颜色数组
```
属性说明:
| 属性 | 说明 |
| ------------- |:-------------:|
| peas_radius | 豆豆大小,半径 |
| peas_count | 豆豆数量 |
如果不能满足你的需要,你可以下载源码自行修改。
## English
### Use
Add it in your root build.gradle at the end of repositories:
```
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
```
Add it in your app build.gradle at the end of repositories:
```
dependencies {
implementation 'com.github.samlss:PeasLoadingView:1.2'
}
```
in layout.xml:
```
```
in java code:
```
peasLoadingView.start(); //start animation
peasLoadingView.stop(); //stop animation
peasLoadingView.setPeasCount(7);//set the peas count
peasLoadingView.setInterpolator(new LinearInterpolator()); //set the animation interpolator
peasLoadingView.setPeasColors(new int[]{Color.RED, Color.WHITE, Color.GREEN, Color.BLUE, Color.YELLOW, Color.MAGENTA, Color.GRAY}); //set the color array
```
Attributes description:
| attr | description |
| ------------- |:-------------:|
| peas_radius | the peas size, radius |
| peas_count | the peas count |
If you can not meet your needs, you can download the source code to modify it.
[id]: http://example.com/ "Optional Title Here"
## [LICENSE](https://github.com/samlss/PeasLoadingView/blob/master/LICENSE)