Yellow5A5/ActSwitchAnimTool

Strange circle created around target

Closed this issue · 3 comments

screenshot_2016-09-29-17-24-14

this is my second activity, after shrink animation the blue circle [Label 1] is keep being there.
any Idea about the reason or how to solve it?

Sry After few work around I solved by

updating mAnimator listener in initAnimation() of SwitchAnimView class.

to be
`mAnimator.addListener(new AnimatorListenerAdapter() {

            @Override
            public void onAnimationStart(Animator animation) {
                if (mSwitchAnimCallback != null) {
                    mSwitchAnimCallback.onAnimationStart();
                }
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                if (mSwitchAnimCallback != null) {
                    mSwitchAnimCallback.onAnimationEnd();
                }
                if(mAnimType == MODE_SHRINK)
                {
                    setmRadius(0);
                    setAlpha(0);
                    SwitchAnimView.this.invalidate();
                }
            }
        });`

ok, thank for your solution.
i have improved it again.

when the onAnimationStart[MODE_SPREAD], it will have some problem.


            mAnimator.addListener(new AnimatorListenerAdapter() {

                @Override
                public void onAnimationStart(Animator animation) {
                    if (mSwitchAnimCallback != null) {
                        mSwitchAnimCallback.onAnimationStart();
                        if(mAnimType == MODE_SPREAD)
                        {
                            setVisibility(VISIBLE);//fix here, too~
                        }
                    }
                }

                @Override
                public void onAnimationEnd(Animator animation) {
                    if (mSwitchAnimCallback != null) {
                        mSwitchAnimCallback.onAnimationEnd();
                        if(mAnimType == MODE_SHRINK)
                        {
                            setVisibility(View.GONE);
                        }
                    }
                }
            });

or setAlpha(1.0f) at onAnimationStart[MODE_SPREAD] .

Great thx man better solution than mine 💃