我想我的動畫只旋轉了一圈。每次我調整持續時間時,它會以相同的速度旋轉更長/更慢。我哪裏錯了?旋轉動畫速度
private static final float ROTATE_FROM = 0.0f; private static final float ROTATE_TO = -10.0f * 360.0f; protected RotateAnimation r = new RotateAnimation(ROTATE_FROM, ROTATE_TO, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); r.setDuration(5000); r.setRepeatCount(0); r.setInterpolator(this, android.R.anim.linear_interpolator); r.setAnimationListener(AndroidVideoPlayer.this); favicon.startAnimation(r);
嗨,我有那裏,我不想它只重複旋轉一次 – Jonno
我添加了我的價值觀。我也猜測這是一個內插器問題! – Jonno
那麼現在我看到你的值了,是'ROTATE_TO'中的'-10.0f'一個錯字?我沒有嘗試,但似乎有點關閉 - 也許它是多次。就像滑雪板一樣。無論如何,如果你找出解決問題的方法,請添加後續評論,這樣下一個發生在頁面上的人就能看到答案。 – dustmachine