Skip to content

Commit a6f66c5

Browse files
committed
Updated the version to v0.3.5.
1 parent 8c0ac7d commit a6f66c5

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Include the library as a local library project or add the dependency in your bui
2121

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

117118
## Change Log
118119

120+
### 0.3.5(2017-01-06)
121+
122+
#### Update:
123+
124+
- Support change the frequency of the waves. [#13](https://github.com/tangqi92/WaveLoadingView/issues/13) / [#23](https://github.com/tangqi92/WaveLoadingView/issues/23)
125+
119126
### 0.3.4(2017-01-05)
120127

121128
#### Update:

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

55
// This is the library version used when deploying the artifact.
6-
version = "0.3.4"
6+
version = "0.3.5"
77

88
android {
99
compileSdkVersion 24
@@ -12,7 +12,7 @@ android {
1212
defaultConfig {
1313
minSdkVersion 14
1414
targetSdkVersion 24
15-
versionCode 6
15+
versionCode 7
1616
versionName "3.0"
1717
}
1818
buildTypes {

library/src/main/java/me/itangqi/waveloadingview/WaveLoadingView.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public enum TriangleDirection {
118118
private Paint mCenterTitleStrokePaint;
119119

120120
// Animation.
121+
private ObjectAnimator waveShiftAnim;
121122
private AnimatorSet mAnimatorSet;
122123

123124
private Context mContext;
@@ -728,13 +729,21 @@ public void resumeAnimation() {
728729
}
729730
}
730731

732+
/**
733+
* Sets the length of the animation. The default duration is 1000 milliseconds.
734+
*
735+
* @param duration The length of the animation, in milliseconds.
736+
*/
737+
public void setAnimDuration(long duration) {
738+
waveShiftAnim.setDuration(duration);
739+
}
740+
731741
private void initAnimation() {
732742
// Wave waves infinitely.
733-
ObjectAnimator waveShiftAnim = ObjectAnimator.ofFloat(this, "waveShiftRatio", 0f, 1f);
743+
waveShiftAnim = ObjectAnimator.ofFloat(this, "waveShiftRatio", 0f, 1f);
734744
waveShiftAnim.setRepeatCount(ValueAnimator.INFINITE);
735745
waveShiftAnim.setDuration(1000);
736746
waveShiftAnim.setInterpolator(new LinearInterpolator());
737-
738747
mAnimatorSet = new AnimatorSet();
739748
mAnimatorSet.play(waveShiftAnim);
740749
}

sample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion '24.0.0'
5+
buildToolsVersion '24.0.2'
66
defaultConfig {
77
applicationId "me.itangqi.waveloadingview"
88
minSdkVersion 14
99
targetSdkVersion 24
10-
versionCode 6
10+
versionCode 7
1111
versionName '3.0'
1212
}
1313
buildTypes {

sample/src/main/java/me/itangqi/waveloadingview/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ protected void onCreate(Bundle savedInstanceState) {
2525
setContentView(R.layout.activity_main);
2626

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

2931
// Shape Type
3032
findViewById(R.id.tv_shape).setOnClickListener(new View.OnClickListener() {

0 commit comments

Comments
 (0)