示例#1
0
 private void startSplashAnimation() {
   LinearAnimation animation = new LinearAnimation();
   animation.setDuration(2 * 1000);
   animation.setRepeatCount(0);
   final Random random = new Random();
   animation.setInterpolator(new LinearInterpolator());
   animation.setLinearAnimationListener(
       new LinearAnimation.LinearAnimationListener() {
         @Override
         public void applyTans(float interpolatedTime) {
           //                startAngle = 360 * interpolatedTime;
           Log.d("", " straaaaaaaa == " + interpolatedTime);
           float ratio = interpolatedTime;
           mBallPaint.setAlpha((int) (ratio * 255));
           mRadius = (interpolatedTime) * 40;
           mBigRadius = getMeasuredWidth() / 2 * ratio;
           invalidate();
         }
       });
   startAnimation(animation);
 }