https://github.com/samlss/pacmanloadingview
👄A pacman loading view.
https://github.com/samlss/pacmanloadingview
android loading loadingview pacman
Last synced: 10 months ago
JSON representation
👄A pacman loading view.
- Host: GitHub
- URL: https://github.com/samlss/pacmanloadingview
- Owner: samlss
- License: mit
- Created: 2018-07-06T07:54:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-09T12:54:57.000Z (over 7 years ago)
- Last Synced: 2025-04-08T11:37:58.081Z (about 1 year ago)
- Topics: android, loading, loadingview, pacman
- Language: Java
- Homepage:
- Size: 1.14 MB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PacmanLoadingView
A pacman loading view(一个吃豆豆的loading view)。
[](https://github.com/samlss/PacmanLoadingView) [](https://github.com/samlss/PacmanLoadingView/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:PacmanLoadingView:1.12'
}
```
布局中使用:
```
```
代码中使用:
```
pacmanLoadingView.start(); //开始动画,需要调用该接口开始动画
pacmanLoadingView.stop(); //结束动画
pacmanLoadingView.setEaterColor(Color.BLACK); //设置吃东西的圆的颜色
pacmanLoadingView.setPeasColor(Color.BLUE); //设置豆的颜色
```
属性说明:
| 属性 | 说明 |
| ------------- |:-------------:|
| eater_color | 吃东西的圆的颜色|
| peas_color | 豆豆的颜色 |
| speed | 吃的速度(normal正常,fast快,slow慢)|
如果不能满足你的需要,你可以下载源码自行修改。
## 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:PacmanLoadingView:1.12'
}
```
in layout.xml:
```
```
in java code:
```
pacmanLoadingView.start(); //start loading animation, need to call this method to start anim.
pacmanLoadingView.stop(); //stop loading animation
pacmanLoadingView.setEaterColor(Color.BLACK); //set the eater's color
pacmanLoadingView.setPeasColor(Color.BLUE); //set the pea's color
```
Attributes description:
| attr | description |
| ------------- |:-------------:|
| eater_color | the eater's color|
| peas_color | the pea's color |
| speed | the eating speed(normal,fast,slow)|
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/PacmanLoadingView/blob/master/LICENSE)