Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions src/com/tekle/oss/android/animation/AnimationFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,29 @@ public static void flipTransition(final ViewAnimator viewAnimator, FlipDirection
final View toView = viewAnimator.getChildAt(nextIndex);

Animation[] animc = AnimationFactory.flipAnimation(fromView, toView, (nextIndex < currentIndex?dir.theOtherDirection():dir), duration, null);

viewAnimator.setOutAnimation(animc[0]);
viewAnimator.setInAnimation(animc[1]);

viewAnimator.setOutAnimation(animc[0]);
viewAnimator.setInAnimation(animc[1]);

// Retain viewAnimator until animation ends
viewAnimator.setHasTransientState(true);
animc[1].setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}

@Override
public void onAnimationEnd(Animation animation) {
// Release viewAnimator
viewAnimator.setHasTransientState(false);
}

@Override
public void onAnimationRepeat(Animation animation) {
}
});

viewAnimator.showNext();
viewAnimator.showNext();
}

//////////////
Expand Down Expand Up @@ -310,7 +328,7 @@ public static Animation outToTopAnimation(long duration, Interpolator interpolat
* @param duration the animation duration in milliseconds
* @param delay how long to wait before starting the animation, in milliseconds
* @return a fade animation
* @see #fadeInAnimation(View, long)
* @see #fadeInAnimation(long, long)
*/
public static Animation fadeInAnimation(long duration, long delay) {

Expand All @@ -328,7 +346,7 @@ public static Animation fadeInAnimation(long duration, long delay) {
* @param duration the animation duration in milliseconds
* @param delay how long to wait before starting the animation, in milliseconds
* @return a fade animation
* @see #fadeOutAnimation(View, long)
* @see #fadeOutAnimation(long, long)
*/
public static Animation fadeOutAnimation(long duration, long delay) {

Expand Down