Strange circle created around target
Closed this issue · 3 comments
AladdinHZ commented
AladdinHZ commented
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();
}
}
});`
Yellow5A5 commented
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] .
AladdinHZ commented
Great thx man better solution than mine 💃