0

画像を回転させていますが、今のところ、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);

    }
4

1 に答える 1

0

この問題はSOで処理されます。この問題は、リンク先の投稿で処理された質問と重複している可能性があります。

他の投稿では、アニメーションの長さを中継することを提案しています。または、ビューがまだアニメーション内にあるかどうかを時間間隔でチェックします。これらの解決策はどれもうまくいかないかもしれません。

編集:しかし、これは:-)

終わりを知りたいアニメーションの AnimationListener を利用します。 http://developer.android.com/reference/android/view/animation/Animation.html#setAnimationListener%28android.view.animation.Animation.AnimationListener%29

于 2012-07-26T06:11:59.953 に答える