我正在旋转图像,并希望现在运行System.out.println(“Transformation done!”);转型完成后。方法是:
protected void applyTransformation(float interpolatedTime, Transformation t) {
final float fromDegrees = mFromDegrees;
float degrees = fromDegrees + ((mToDegrees - fromDegrees) * interpolatedTime);
final float centerX = mCenterX;
final float centerY = mCenterY;
final Camera camera = mCamera;
final Matrix matrix = t.getMatrix();
camera.save();
camera.rotateX(degrees);
camera.getMatrix(matrix);
camera.restore();
matrix.preTranslate(-centerX, -centerY);
matrix.postTranslate(centerX, centerY);
}
答案 0 :(得分:0)
问题已解决here at SO。此问题可能与发布链接所处理的问题重复。
在另一篇文章中,他们建议继续动画的持续时间。或者,如果视图仍在动画中,则检查时间间隔。没有这些解决方案可能适合你。
编辑:但这可能: - )
用户想要知道结束的动画的AnimationListener。 http://developer.android.com/reference/android/view/animation/Animation.html#setAnimationListener%28android.view.animation.Animation.AnimationListener%29