Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 685b28fc authored by NoraBora's avatar NoraBora Committed by Steve Kondik
Browse files

ViewAnimator.setAnimateFirstView() doesn't work for out-animation.

parent ab73bcb4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -138,14 +138,15 @@ public class ViewAnimator extends FrameLayout {
        final int count = getChildCount();
        for (int i = 0; i < count; i++) {
            final View child = getChildAt(i);
            final boolean checkForFirst = (!mFirstTime || mAnimateFirstTime);
            if (i == childIndex) {
                if ((!mFirstTime || mAnimateFirstTime) && mInAnimation != null) {
                if (checkForFirst && mInAnimation != null) {
                    child.startAnimation(mInAnimation);
                }
                child.setVisibility(View.VISIBLE);
                mFirstTime = false;
            } else {
                if (mOutAnimation != null && child.getVisibility() == View.VISIBLE) {
                if (checkForFirst && mOutAnimation != null && child.getVisibility() == View.VISIBLE) {
                    child.startAnimation(mOutAnimation);
                } else if (child.getAnimation() == mInAnimation)
                    child.clearAnimation();