https://github.com/samlss/coffeeview
🍵A cup of coffee loading view.
https://github.com/samlss/coffeeview
android coffeeview loadingview
Last synced: 11 months ago
JSON representation
🍵A cup of coffee loading view.
- Host: GitHub
- URL: https://github.com/samlss/coffeeview
- Owner: samlss
- License: mit
- Created: 2018-08-31T08:49:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T08:49:14.000Z (over 7 years ago)
- Last Synced: 2025-04-08T11:38:09.215Z (about 1 year ago)
- Topics: android, coffeeview, loadingview
- Language: Java
- Homepage:
- Size: 517 KB
- Stars: 11
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README-ZH.md
- License: LICENSE
Awesome Lists containing this project
README
# CoffeeView
一杯咖啡的loading view.
你可以指定杯子颜色,杯垫颜色,烟雾的颜色
### [更多](https://github.com/samlss/FunnyViews)
[](https://github.com/samlss/CoffeeView) [](https://github.com/samlss/CoffeeView/blob/master/LICENSE) [](https://blog.csdn.net/Samlss)
### 默认效果:

### 自定义颜色效果:

### 使用
在根目录的build.gradle添加这一句代码:
```java
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
```
在app目录下的build.gradle添加依赖使用:
```java
dependencies {
implementation 'com.github.samlss:CoffeeView:1.1'
}
```
布局中:
```java
```
代码:
```java
cofeeView.setCupColor(Color.BLUE); //设置杯子颜色
coffeeView.setCoasterColor(Color.RED); //设置杯垫颜色
coffeeView.setVaporColor(Color.GREEN); //设置烟雾颜色
coffeeView.start(); //开始动画
coffeeView.stop(); //停止动画
coffeeView.release(); //不需要使用该loading view的时候可手动释放,例如在activity的ondestroy()中
```
属性说明:
| 属性 | 说明 |
| --------------- | :----------------------------------: |
| cupColor | 杯子颜色 |
| coasterColor | 杯垫颜色 |
| vaporColor | 烟雾颜色 |
# Note
你可以通过设置CoffeView的宽高来调整你想要的样式,关于烟雾的动画设置如果不符合你的要求的话,你可以下载源码进行修改,如果你喜欢请不要吝啬你的star
## [LICENSE](https://github.com/samlss/CoffeeView/blob/master/LICENSE)