@@ -40,22 +40,13 @@ public void createAnimation() {
40
40
int [] delays =new int []{120 ,240 ,360 };
41
41
for (int i = 0 ; i < 3 ; i ++) {
42
42
final int index =i ;
43
-
44
- /* Keyframe k1=Keyframe.ofFloat(0,1);
45
- */ /*k1.setInterpolator(new CubicBezierInterpolator(0.2, 0.68,0.18, 1.08));*/ /*
46
- k1.setInterpolator(new LinearInterpolator());
47
- */ /*k1.setInterpolator(PathInterpolatorCompat.create(0.2f, 0.68f, 0.18f, 1.08f));*/ /*
48
- Keyframe k2=Keyframe.ofFloat(0.3f,0.3f);
49
- */ /*k2.setInterpolator(PathInterpolatorCompat.create(0.2f, 0.68f,0.18f, 1.08f));*/ /*
50
- k2.setInterpolator(new LinearInterpolator());
51
- Keyframe k3=Keyframe.ofFloat(1, 1);
52
- PropertyValuesHolder holder=PropertyValuesHolder.ofKeyframe("scale", k1, k2, k3);
53
- ValueAnimator scaleAnim=ValueAnimator.ofPropertyValuesHolder(holder);*/
54
-
43
+
55
44
ValueAnimator scaleAnim =ValueAnimator .ofFloat (1 ,0.3f ,1 );
45
+
56
46
scaleAnim .setDuration (750 );
57
47
scaleAnim .setRepeatCount (-1 );
58
48
scaleAnim .setStartDelay (delays [i ]);
49
+
59
50
scaleAnim .addUpdateListener (new ValueAnimator .AnimatorUpdateListener () {
60
51
@ Override
61
52
public void onAnimationUpdate (ValueAnimator animation ) {
0 commit comments