Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tangqi92 committed Dec 15, 2015
0 parents commit 37b8ece
Show file tree
Hide file tree
Showing 50 changed files with 1,911 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/dictionaries/tangqi92.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 143 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# WaveLoadingView

[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)

**WaveLoadingView** - An Android library providing to realize wave loading effect.

<img src="/screenshots/ss.png" alt="screenshot" title="screenshot" width="450" height="495" />

## Sample

![sample.gif](/screenshots/sample.gif "sample.gif")



## Usage

**For a working implementation of this project see the `sample/` folder.**

### Setp 1

Include the library as local library project or add the dependency in your build.gradle.

```groovy
dependencies {
compile 'me.itangqi.waveloadingview:library:0.1.2'
}
```
### Step 2

Include the WaveLoadingView widget in your layout. And you can customize it like this.

```xml
<me.itangqi.waveloadingview.WaveLoadingView
android:id="@+id/waveLoadingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:borderWidth="3"
app:borderColor="@color/colorAccent"
app:progressValue="40"
app:shapeType="circle"
app:waveColor="@color/colorAccent"
app:waveAmplitude="50"
app:titleTop="Top Title"
app:titleTopColor="@color/colorPrimaryText"
app:titleTopSize="20"
app:titleCenter="Center Title"
app:titleCenterColor="@color/colorPrimaryText"
app:titleCenterSize="24"
app:titleBottom="Bottom Title"
app:titleBottomColor="@color/colorPrimaryText"
app:titleBottomSize="20"
```

### Step 3

Absolutely,you can write some animation codes to the callbacks such as setOnCheckedChangeListener, onProgressChanged, etc in your Activity.


```java
WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
mWaveLoadingView.setShapeType(WaveLoadingView.ShapeType.CIRCLE);
mWaveLoadingView.setTopTitle("Top Title");
mWaveLoadingView.setCenterTitleColor(Color.GRAY);
mWaveLoadingView.setBottomTitleSize(18);
mWaveLoadingView.setProgress(80);
mWaveLoadingView.setBorderWidth(10);
mWaveLoadingView.setAmplitudeRatio(60);
mWaveLoadingView.setWaveColor(Color.GRAY);
mWaveLoadingView.setBorderColor(Color.GRAY);
```

## Customization

Do what you what :)

* `app:borderWidth` (integer) Default to be 0
* `app:borderColor` (color)
* `app:progressValue` (integer) Set ProgressValue
* `app:shapeType` (circle/square) Default to be circle
* `app:waveColor` (color)
* `app:waveAmplitude` (integer) Set Wave Amplitude (between 1 and 100)
* `app:titleTopSize` (float)
* `app:titleCenterSize` (float)
* `app:titleBottomSize` (float)
* `app:titleTopColor` (color)
* `app:titleCenterColor` (color)
* `app:titleBottomColor` (color)
* `app:titleTop` (string) default to be ""
* `app:titleCenter` (string)
* `app:titleBottom ` (string)

**All attributes have their respective getters and setters to change them at runtime.**

## Demo

[Download]()



## Community

Looking for contributors, feel free to fork !

Tell me if you're using my library in your application, I'll share it in this README.



## Thanks

Inspired by

- [WaveView](https://github.com/gelitenight/WaveView) created by [gelitenight](https://github.com/gelitenight)
- [CircularFillableLoaders](https://github.com/lopspower/CircularFillableLoaders) created by [lopspower](https://github.com/lopspower)

## Contact Me

Born in 1992, now a student of Southeast University, master of software engineerin. Loving technology, programming, reading and sports.

I will graduate in June 2017, expect the internship or full-time job in Android or iOS.

If you have any questions or want to make friends with me, please feel free to contact me : [imtangqi#gmail.com](mailto:imtangqi@gmail.com "Welcome to contact me")



## License

<pre>

Copyright 2014 Qi Tang

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.

</pre>
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Loading

0 comments on commit 37b8ece

Please sign in to comment.