[英]android: Transition animation
我只有一個調查表布局。 當我按下下一步時,是否可能會出現過渡效果? 無需特別更改,僅播放動畫效果就好像用戶進入了下一個問題。
// this animation will move the animation outside to the left.
TranslateAnimation exitAnimation = new TranslateAnimation(0, -exitingView.getWidth(), 0, 0);
exitAnimation.setDurtion(someDurationInMilliseconds);
exitAnimation.setAnimationListener(new TranslateAnimation.AnimationListener() {
public void onAnimationEnd(Animation animation)
{
exitingView.setVisibility(View.GONE);
}
public void onAnimationRepeat(Animation animation) { }
public void onAnimationStart(Animation animation) { }
});
exitingView.startAnimation(exitAnimation);
enteringView.setVisibility(View.VISIBLE);
// ... create an animation for the entering view similar to above.
這應該使您入門。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.