Skip to content

Commit

Permalink
Updated the version to v0.3.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
tangqi92 committed Jan 6, 2017
1 parent 8c0ac7d commit a6f66c5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Include the library as a local library project or add the dependency in your bui

```groovy
dependencies {
compile 'me.itangqi.waveloadingview:library:0.3.4'
// I have uploaded v0.3.4 on 2017-01-05, if it doesn't take effect or your
// gradle cannot find it in maven central, you may try v0.3.2.
compile 'me.itangqi.waveloadingview:library:0.3.5'
// I have uploaded v0.3.5 on 2017-01-06, if it doesn't take effect or your
// gradle cannot find it in maven central, you may try v0.3.4.
}
```
Or
Expand Down Expand Up @@ -72,6 +72,7 @@ You can write some animation codes to the callbacks such as setOnCheckedChangeLi
mWaveLoadingView.setBorderColor(Color.GRAY);
mWaveLoadingView.setTopTitleStrokeColor(Color.BLUE);
mWaveLoadingView.setTopTitleStrokeWidth(3);
mWaveLoadingView.setAnimDuration(3000);
mWaveLoadingView.pauseAnimation();
mWaveLoadingView.resumeAnimation();
mWaveLoadingView.cancelAnimation();
Expand Down Expand Up @@ -116,6 +117,12 @@ Please feel free to :)

## Change Log

### 0.3.5(2017-01-06)

#### Update:

- Support change the frequency of the waves. [#13](https://github.com/tangqi92/WaveLoadingView/issues/13) / [#23](https://github.com/tangqi92/WaveLoadingView/issues/23)

### 0.3.4(2017-01-05)

#### Update:
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

// This is the library version used when deploying the artifact.
version = "0.3.4"
version = "0.3.5"

android {
compileSdkVersion 24
Expand All @@ -12,7 +12,7 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 6
versionCode 7
versionName "3.0"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public enum TriangleDirection {
private Paint mCenterTitleStrokePaint;

// Animation.
private ObjectAnimator waveShiftAnim;
private AnimatorSet mAnimatorSet;

private Context mContext;
Expand Down Expand Up @@ -728,13 +729,21 @@ public void resumeAnimation() {
}
}

/**
* Sets the length of the animation. The default duration is 1000 milliseconds.
*
* @param duration The length of the animation, in milliseconds.
*/
public void setAnimDuration(long duration) {
waveShiftAnim.setDuration(duration);
}

private void initAnimation() {
// Wave waves infinitely.
ObjectAnimator waveShiftAnim = ObjectAnimator.ofFloat(this, "waveShiftRatio", 0f, 1f);
waveShiftAnim = ObjectAnimator.ofFloat(this, "waveShiftRatio", 0f, 1f);
waveShiftAnim.setRepeatCount(ValueAnimator.INFINITE);
waveShiftAnim.setDuration(1000);
waveShiftAnim.setInterpolator(new LinearInterpolator());

mAnimatorSet = new AnimatorSet();
mAnimatorSet.play(waveShiftAnim);
}
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
buildToolsVersion '24.0.2'
defaultConfig {
applicationId "me.itangqi.waveloadingview"
minSdkVersion 14
targetSdkVersion 24
versionCode 6
versionCode 7
versionName '3.0'
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
// Sets the length of the animation, default is 1000.
mWaveLoadingView.setAnimDuration(3000);

// Shape Type
findViewById(R.id.tv_shape).setOnClickListener(new View.OnClickListener() {
Expand Down

0 comments on commit a6f66c5

Please sign in to comment.