https://github.com/samlss/flaskview
🍼A flask loading view.
https://github.com/samlss/flaskview
android flaskloadingview loadingview view
Last synced: 11 months ago
JSON representation
🍼A flask loading view.
- Host: GitHub
- URL: https://github.com/samlss/flaskview
- Owner: samlss
- License: apache-2.0
- Created: 2018-10-08T11:58:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-04T02:22:54.000Z (over 7 years ago)
- Last Synced: 2025-04-08T11:38:03.445Z (about 1 year ago)
- Topics: android, flaskloadingview, loadingview, view
- Language: Java
- Homepage:
- Size: 883 KB
- Stars: 5
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FlaskView
[](https://bintray.com/samlss/maven/flaskview/1.0.0/link) [](https://android-arsenal.com/api?level=11#l11) [](https://github.com/samlss/FlaskView/blob/master/LICENSE) [](https://blog.csdn.net/Samlss)
A flask loading view.
### [More](https://github.com/samlss/FunnyViews)
### [中文](https://blog.csdn.net/Samlss/article/details/82983992)


------
### Usage
#### Gradle
Add it in your app build.gradle at the end of repositories:
```java
dependencies {
implementation 'me.samlss:flaskview:1.0.0'
}
```
#### Maven
```java
me.samlss
flaskview
1.0.0
pom
```
#### In layout.xml
```java
```
#### In code
```java
flaskView.setBubbleColor(Color.parseColor("#fff36a")); //Set the color of all the bubbles
flaskView.setStrokeColor(Color.parseColor("#b9a4a4")); //Set the stroke color of flask
flaskView.setWaterColor(Color.parseColor("#3b537b")); //Set the water color
flaskView.setStrokeWidth(10); //Set the flask stroke width in pixel
flaskView.setBubbleCreationInterval(60); //Set the creation of the bubble interval in millis
flaskView.setWaterHeightPercent(0.6f); //Set the water level to the percentage of the height of the flask, value is [0-1]
flaskView.start(); //Start animation
flaskView.stop(); //Stop animation
flaskView.release(); //Release the flask view
```
#### attr
```java
```
### Optimization
Use a fixed number of containers to recycle bubbles that are no longer in use. When need to create bubble, firstly get them from the recycled container. If there are bubbles in the recycled container, reuse the object, otherwise a new one will be created.[Read the code](https://github.com/samlss/FlaskView/blob/master/flaskview/src/main/java/me/samlss/view/FlaskView.java)
### License
```
Copyright 2018 samlss
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```