faruktoptas / FancyShowCaseView

An easy-to-use customisable show case view with circular reveal animation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onEnterAnimationEnd is not called when using custom enterAnimation

LuizMoura opened this issue · comments

I was trying disabling the animations in-between FancyShowCaseQueue's queue.show(), trying to make so that only the first Enter and the last Exit animations on the queue played.
My problem is that even setting the Enter and Exit animations to AlphaAnimation(1f, 1f) which is basically a "don't do anything" animation, there is a tiny "flicker" between itens

Trying to solve this, I notice that the props.animationListener?.onEnterAnimationEnd listener is only triggered by the doCircularEnterAnimation and not called if a custom enter animation is provided, even though the hide function always calls props.animationListener?.onExitAnimationEnd

And the doCircularExitAnimation don't work properly if you don't use the doCircularEnterAnimation before it

I think that if startEnterAnimation called props.animationListener?.onEnterAnimationEnd event with a custom animation, I maybe be able to achieve a effect close to the one that I was looking for... (unless you want to make disabling FancyShowCaseQueue in-between animations a part of standart lib, which would be even more awesome)

Hi @LuizMoura
I'm planning to optionally disable in-between animations for queue.

  • If you set a custom animation you can add an animationEnd listener to the animation.
  • I will try to find out if there is a bug with circular enter/exit animations.
  • I think the reason of flicker is detaching and re-attaching the view to the during transition to the next item of the queue. I planning to implement queue mechanism without detaching (only changing the focus view) It will be a better approach.
    If you are interested in contributing PRs welcome :)

Duplicate of #196