表示を外していますが、カードを回転させるような表示になります。
以下はビューを回転させますが、私がしようとしているものではありません。回転アニメーションの回転アニメーションがビューから外になっています
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="1500"
android:fromDegrees="0"
android:pivotX="100%"
android:pivotY="50%"
android:startOffset="0"
android:toDegrees="220" />
</set>
私は何をした後だと、固定中心の周り自体の回転が、カードを投げると似た動きではありません。
どうすればいいですか?
更新
私は@loadedionからの回答後にこれを試みたが、動作していない:
ObjectAnimator rotateAnimation = ObjectAnimator.ofFloat(rootView, "rotation", 0.0f, 360f);
rotateAnimation.setDuration(5000);
ObjectAnimator throwAnimation = ObjectAnimator.ofFloat(rootView, "x", rootView.getX(), rootView.getX() + 200);
throwAnimation.setInterpolator(new AccelerateInterpolator());
throwAnimation.setDuration(3000);
ObjectAnimator throwAnimation2 = ObjectAnimator.ofFloat(rootView, "y", rootView.getY(), rootView.getY() + 200);
throwAnimation.setInterpolator(new AccelerateInterpolator());
throwAnimation.setDuration(3000);
AnimatorSet cardThrowAnimations = new AnimatorSet();
cardThrowAnimations.playSequentially(rotateAnimation, throwAnimation, throwAnimation2);
cardThrowAnimations.start();
私はplaySequentially'が各アニメーションまで待機します '信じます次のカードが始まる前に完了しているので、カードが5秒間本当にゆっくりと回転し、次に3秒間右に移動してから3秒間少し下に移動するように見えますconds。それはあなたが見ているものですか? 'playTogether'を使うと同時にすべてのアニメーションを実行します。 – loadedion