@@ -15,46 +15,11 @@ public class SquareSpinIndicator extends BaseIndicatorController {
15
15
@ Override
16
16
public void draw (Canvas canvas , Paint paint ) {
17
17
canvas .drawRect (new RectF (getWidth ()/5 ,getHeight ()/5 ,getWidth ()*4 /5 ,getHeight ()*4 /5 ),paint );
18
-
19
- /*Path path=new Path();
20
- path.moveTo(0,getHeight());
21
- path.lineTo(getWidth(), getHeight());
22
- path.lineTo(getWidth()/2,0);
23
- path.close();
24
- canvas.drawPath(path, paint);*/
25
18
}
26
19
27
20
@ Override
28
21
public void createAnimation () {
29
- /*ObjectAnimator rotationXAnimation=ObjectAnimator.ofFloat(getTarget(), "rotationX",0,180,180,0,0);
30
- rotationXAnimation.setDuration(3000);
31
-
32
- ObjectAnimator rotationYAnimation=ObjectAnimator.ofFloat(getTarget(), "rotationY",0,0,180,180,0);
33
- rotationYAnimation.setDuration(3000);
34
-
35
- final AnimatorSet animatorSet=new AnimatorSet();
36
- animatorSet.playTogether(rotationXAnimation,rotationYAnimation);
37
- animatorSet.addListener(new AnimatorListenerAdapter() {
38
- @Override
39
- public void onAnimationRepeat(Animator animation) {
40
- super.onAnimationRepeat(animation);
41
- System.out.println("onAnimationRepeat");
42
- }
43
-
44
- @Override
45
- public void onAnimationEnd(Animator animation) {
46
- super.onAnimationEnd(animation);
47
- System.out.println("onAnimationEnd(");
48
- animatorSet.start();
49
- }
50
- });
51
- animatorSet.start();*/
52
-
53
-
54
- /*PropertyValuesHolder rotation1=PropertyValuesHolder.ofFloat("rotationX",0,180,0,0,0);
55
- PropertyValuesHolder rotation2=PropertyValuesHolder.ofFloat("rotationX",0,0,180,0,0);
56
- PropertyValuesHolder rotation3=PropertyValuesHolder.ofFloat("rotationY",0,0,180,0,0);
57
- PropertyValuesHolder rotation4=PropertyValuesHolder.ofFloat("rotationY",0,0,0,180,0);*/
22
+
58
23
59
24
PropertyValuesHolder rotation5 =PropertyValuesHolder .ofFloat ("rotationX" ,0 ,180 ,180 ,0 ,0 );
60
25
PropertyValuesHolder rotation6 =PropertyValuesHolder .ofFloat ("rotationY" ,0 ,0 ,180 ,180 ,0 );
0 commit comments