https://github.com/samlss/signalloadingview
📶A signal rotation loading view.
https://github.com/samlss/signalloadingview
android loadingview
Last synced: 11 months ago
JSON representation
📶A signal rotation loading view.
- Host: GitHub
- URL: https://github.com/samlss/signalloadingview
- Owner: samlss
- License: mit
- Created: 2018-07-25T03:25:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-09T11:19:51.000Z (over 7 years ago)
- Last Synced: 2025-04-08T11:38:01.001Z (about 1 year ago)
- Topics: android, loadingview
- Language: Java
- Homepage:
- Size: 1.95 MB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SignalLoadingView
A signal rotation loading view(一个信号旋转loading view).
[](https://github.com/samlss/SignalLoadingView) [](https://github.com/samlss/SignalLoadingView/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:SignalLoadingView:1.1'
}
```
布局中使用:
```
```
代码中使用:
```
signalLoadingView.start(); //开始动画
signalLoadingView.stop(); //结束动画
signalLoadingView.setInterpolator(new LinearInterpolator());//设置动画插值器
signalLoadingView.setSignalColor(Color.RED);//设置信号颜色
signalLoadingView.setDuration(500); //设置动画执行时间
```
属性说明:
| 属性 | 说明 |
| ------------- |:-------------:|
| signal_color | 信号颜色 |
| duration | 动画时间 |
| interpolator | 动画加速器 |
### 插值器值interpolator:
* AccelerateDecelerateInterpolator
* AccelerateInterpolator
* DecelerateInterpolator
* BounceInterpolator
* CycleInterpolator
* LinearInterpolator
* AnticipateOvershootInterpolator
* AnticipateInterpolator
* OvershootInterpolator
如果不能满足你的需要,你可以下载源码自行修改。
## 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:SignalLoadingView:1.1'
}
```
in layout.xml:
```
```
in java code:
```
signalLoadingView.start(); //start animation
signalLoadingView.stop(); //stop animation
signalLoadingView.setInterpolator(new LinearInterpolator());//set the animator interpolator
signalLoadingView.setSignalColor(Color.RED);//set the signal color
signalLoadingView.setDuration(500); //set the animator duration
```
Attributes description:
| attr | description |
| ------------- |:-------------:|
| signal_color | the signal color |
| duration | the animator duration |
| interpolator | the animator interpolator |
### interpolator:
* AccelerateDecelerateInterpolator
* AccelerateInterpolator
* DecelerateInterpolator
* BounceInterpolator
* CycleInterpolator
* LinearInterpolator
* AnticipateOvershootInterpolator
* AnticipateInterpolator
* OvershootInterpolator
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)