javaandroidanimationandroid-animationviewanimator

Android: Add delay between the in and out animation of ViewAnimator


I'm simply trying to animate my view transaction using a ViewAnimator.

But I want my view to slide out and in from the SAME side.

Since the in and out animation happen at the same time, how can I add a delay between the in and out animation so my in transaction appear nicely?


Solution

  • Just use this in ur animation xml :

    android:startOffset = "x"
    

    It means that your animation will start after x milliseconds