https://github.com/samlss/cubeloadingview
📦A cube 3D rotation loading view.
https://github.com/samlss/cubeloadingview
android loadingview
Last synced: 5 months ago
JSON representation
📦A cube 3D rotation loading view.
- Host: GitHub
- URL: https://github.com/samlss/cubeloadingview
- Owner: samlss
- License: mit
- Created: 2018-08-20T09:09:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T07:05:10.000Z (over 7 years ago)
- Last Synced: 2025-04-08T11:38:00.390Z (about 1 year ago)
- Topics: android, loadingview
- Language: Java
- Homepage:
- Size: 349 KB
- Stars: 18
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README-ZH.md
- License: LICENSE
Awesome Lists containing this project
README
# CubeLoadingView
一个立体3d旋转的loading view
[](https://github.com/samlss/CubeLoadingView) [](https://github.com/samlss/CubeLoadingView/blob/master/LICENSE) [](https://blog.csdn.net/Samlss)

### 使用
在根目录的build.gradle添加这一句代码:
```
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
```
在app目录下的build.gradle添加依赖使用:
```
dependencies {
implementation 'com.github.samlss:CubeLoadingView:1.0'
}
```
布局中使用:
```
```
代码中使用:
```
cubeLoadingView.setFirstSideColor(Color.RED); //设置第一面的颜色
cubeLoadingView.setSecondSideColor(Color.RED); //设置第二面的颜色
cubeLoadingView.setThirdSideColor(Color.RED); //设置第三面的颜色
cubeLoadingView.setFourthSideColor(Color.RED); //设置第四面的颜色
cubeLoadingView.pause(); //暂停动画
cubeLoadingView.resume(); //恢复动画
cubeLoadingView.start(); //开始动画
cubeLoadingView.stop(); //停止动画
cubeLoadingView.release(); //不需要使用该loading view的时候可手动释放,例如在activity的ondestroy()中
```
属性说明:
开始属性说明之前,先看一张图
| 属性 | 说明 |
| ------------- |:-------------:|
| firstSideColor | 第一面颜色 |
| secondSideColor | 第二面颜色 |
| thirdSideColor | 第三面颜色 |
| fourthSideColor | 第四面颜色 |
## [LICENSE](https://github.com/samlss/CubeLoadingView/blob/master/LICENSE)