Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ajian-studio/GADownloading
A Gorgeous LoadingView (一个绚丽的LoadingView )
https://github.com/Ajian-studio/GADownloading
Last synced: about 1 month ago
JSON representation
A Gorgeous LoadingView (一个绚丽的LoadingView )
- Host: GitHub
- URL: https://github.com/Ajian-studio/GADownloading
- Owner: Ajian-studio
- Created: 2016-12-15T08:12:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-06T01:23:09.000Z (almost 8 years ago)
- Last Synced: 2024-08-01T19:37:55.971Z (4 months ago)
- Language: Java
- Homepage:
- Size: 350 KB
- Stars: 931
- Watchers: 21
- Forks: 123
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - GADownloading - 创意下载进度条 (DownloadView)
README
## GADownloading
## [中文文档](https://github.com/Ajian-studio/GADownloading/blob/master/README_CN.md)
### 1 Creative prototype:#### The effect is shown below:
![](https://github.com/Ajian-studio/GADownloading/raw/master/raw/loadingView_full_v.gif)
#### Through the code to achieve the effect is as follows:
State of success:
![](https://github.com/Ajian-studio/GADownloading/raw/master/raw/my_loading_view_success.gif)
State of fail:
![](https://github.com/Ajian-studio/GADownloading/raw/master/raw/my_loading_view_failed.gif)
We have achieved most of the results, the rest to you, ha ha,😄;Note:
1.The project does not use any image resources, most of the colors can be changed by custom attributes;
2.LoadingView will automatically adjust the width and height, the proposed width of not less than 100dp, otherwise ineffective;## 2 How to Use:
### 2.1 How To Obtain Project Resources
The two forms of obtaining project resources are:
1).Use libraries directly on JitPack;
2).Copy the project's GADownloadingView and associated resources;#### 2.1.1 Use Libraries Directly On JitPack
step 1. In the project build.gradle add the following code:
```
allprojects {
repositories {
...
// add the follow code
maven { url 'https://jitpack.io' }
}
}
```
step 2. In the module's build.gradle add the following code:
```
dependencies {
compile 'com.github.Ajian-studio:GADownloading:v1.0.2'
}```
#### 2.1.2 Copy The Project's Resouces
Copy the src/ui/GADownloadingView and res/values/attr.xml files directly into the appropriate directory### 2.2 Add GADownloadingView To The Layout File
```
```
### 2.3 Find The View In The Activity
```
mGADownloadingView = (GADownloadingView) findViewById(R.id.ga_downloading);
```
### 2.4 Core Interface#### 2.4.1 performAnimation()
Start the animation;#### 2.4.2 updateProgress(int progress)
Update progress;#### 2.4.3 onFail():
The download fails, and the execution fails with some animation;### 2.5 Custom Properties
#### 2.5.1 You Can Change The Properties
```
```
#### 2.5.2 How To Use Customize Properties
Add a custom property namespace:
```
```
Add some custom properties
```
```Finally, if you feel pretty good, please click the Star!
Welcome to join the GAStudio exchange qq group: 277582728;
## License
Copyright 2016 GAStudioLicensed 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 athttp://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.