2016-10-17 7 views
1

ObjectAnimatorを使用して、RelativeLayoutの位置を画面の中心から上に移動します。アニメーションはRelativeLayoutで機能しますが、スムーズに動かない。開始位置と終了位置の間をジャンプする。 コード:Androidオブジェクトアニメーションが円滑に動作しない

ObjectAnimator animY = ObjectAnimator.ofFloat(logolayout, "y", 350f); 
       animY.setInterpolator(new LinearInterpolator()); 
       animY.setDuration(1500); 
       animY.start(); 
+0

相対レイアウトを交換すると、アニメーションはスムーズに実行されますか?内部にImageViewを持つFrameLayout? – 0X0nosugar

答えて

0

代わりにViewPropertyAnimatorを使用してください。

animate(view).y(350f).setInterpolator(new LinearInterpolator()).setDuration(1500).start(); 
関連する問題