Ejemplo n.º 1
0
  public void rotationHoriztion(int beganDegree, int endDegree, AdView view) {
    final float centerX = 320 / 2.0f;
    final float centerY = 48 / 2.0f;
    final float zDepth = -0.50f * view.getHeight();

    Rotate3dAnimation rotation =
        new Rotate3dAnimation(beganDegree, endDegree, centerX, centerY, zDepth, true);
    rotation.setDuration(1000);
    rotation.setInterpolator(new AccelerateInterpolator());
    rotation.setAnimationListener(
        new Animation.AnimationListener() {
          public void onAnimationStart(Animation animation) {}

          public void onAnimationEnd(Animation animation) {}

          public void onAnimationRepeat(Animation animation) {}
        });
    view.startAnimation(rotation);
  }