Skip to content

Commit d4b96ae

Browse files
committed
new animators, Landing and TakingOff
1 parent 7c66c6b commit d4b96ae

File tree

7 files changed

+53
-8
lines changed

7 files changed

+53
-8
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# org.gradle.parallel=true
1919

2020

21-
VERSION_NAME=1.1.1
22-
VERSION_CODE=12
21+
VERSION_NAME=1.1.2
22+
VERSION_CODE=13
2323
GROUP=com.daimajia.androidanimations
2424

2525
POM_DESCRIPTION=Collect android animations

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "com.daimajia.androidanimations.library"
99
minSdkVersion 8
1010
targetSdkVersion 20
11-
versionCode 12
12-
versionName "1.1.1"
11+
versionCode 13
12+
versionName "1.1.2"
1313
}
1414
buildTypes {
1515
release {

library/src/main/java/com/daimajia/androidanimations/library/BaseViewAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public BaseViewAnimator setInterpolator(Interpolator interpolator) {
122122
}
123123

124124
public long getDuration() {
125-
return mDuration
125+
return mDuration;
126126
}
127127

128128
public AnimatorSet getAnimatorAgent() {

library/src/main/java/com/daimajia/androidanimations/library/Techniques.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
package com.daimajia.androidanimations.library;
2727

2828
import com.daimajia.androidanimations.library.attention.BounceAnimator;
29-
import com.daimajia.androidanimations.library.attention.DropOutAnimator;
3029
import com.daimajia.androidanimations.library.attention.FlashAnimator;
3130
import com.daimajia.androidanimations.library.attention.PulseAnimator;
3231
import com.daimajia.androidanimations.library.attention.RubberBandAnimator;
@@ -75,6 +74,9 @@
7574
import com.daimajia.androidanimations.library.specials.HingeAnimator;
7675
import com.daimajia.androidanimations.library.specials.RollInAnimator;
7776
import com.daimajia.androidanimations.library.specials.RollOutAnimator;
77+
import com.daimajia.androidanimations.library.specials.in.DropOutAnimator;
78+
import com.daimajia.androidanimations.library.specials.in.LandingAnimator;
79+
import com.daimajia.androidanimations.library.specials.out.TakingOffAnimator;
7880
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInAnimator;
7981
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInDownAnimator;
8082
import com.daimajia.androidanimations.library.zooming_entrances.ZoomInLeftAnimator;
@@ -88,6 +90,10 @@
8890

8991
public enum Techniques {
9092

93+
DropOut(DropOutAnimator.class),
94+
Landing(LandingAnimator.class),
95+
TakingOff(TakingOffAnimator.class),
96+
9197
Flash(FlashAnimator.class),
9298
Pulse(PulseAnimator.class),
9399
RubberBand(RubberBandAnimator.class),
@@ -98,7 +104,6 @@ public enum Techniques {
98104
Tada(TadaAnimator.class),
99105
StandUp(StandUpAnimator.class),
100106
Wave(WaveAnimator.class),
101-
DropOut(DropOutAnimator.class),
102107

103108
Hinge(HingeAnimator.class),
104109
RollIn(RollInAnimator.class),
@@ -160,6 +165,8 @@ public enum Techniques {
160165
ZoomOutRight(ZoomOutRightAnimator.class),
161166
ZoomOutUp(ZoomOutUpAnimator.class);
162167

168+
169+
163170
private Class animatorClazz;
164171

165172
private Techniques(Class clazz) {

library/src/main/java/com/daimajia/androidanimations/library/attention/DropOutAnimator.java renamed to library/src/main/java/com/daimajia/androidanimations/library/specials/in/DropOutAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.daimajia.androidanimations.library.attention;
1+
package com.daimajia.androidanimations.library.specials.in;
22

33
import android.view.View;
44

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.daimajia.androidanimations.library.specials.in;
2+
3+
import android.view.View;
4+
5+
import com.daimajia.androidanimations.library.BaseViewAnimator;
6+
import com.daimajia.easing.Glider;
7+
import com.daimajia.easing.Skill;
8+
import com.nineoldandroids.animation.ObjectAnimator;
9+
10+
public class LandingAnimator extends BaseViewAnimator{
11+
@Override
12+
protected void prepare(View target) {
13+
getAnimatorAgent().playTogether(
14+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "scaleX", 1.5f, 1f)),
15+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "scaleY", 1.5f, 1f)),
16+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "alpha", 0, 1f))
17+
);
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.daimajia.androidanimations.library.specials.out;
2+
3+
import android.view.View;
4+
5+
import com.daimajia.androidanimations.library.BaseViewAnimator;
6+
import com.daimajia.easing.Glider;
7+
import com.daimajia.easing.Skill;
8+
import com.nineoldandroids.animation.ObjectAnimator;
9+
10+
public class TakingOffAnimator extends BaseViewAnimator {
11+
@Override
12+
protected void prepare(View target) {
13+
getAnimatorAgent().playTogether(
14+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "scaleX", 1f, 1.5f)),
15+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "scaleY", 1f, 1.5f)),
16+
Glider.glide(Skill.QuintEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "alpha", 1, 0))
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)