skydoves / Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.
https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/index.html
Apache License 2.0
3.73k stars 291 forks source link

Cannot start this animator on a detached view #22

Closed ghost closed 4 years ago

ghost commented 4 years ago

Please complete the following information:

Describe the Bug:

Fatal Exception: java.lang.IllegalStateException: Cannot start this animator on a detached view!
       at android.view.RenderNode.addAnimator(RenderNode.java:803)
       at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:300)
       at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:282)
       at android.animation.RevealAnimator.<init>(RevealAnimator.java:37)
       at android.view.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:71)
       at com.skydoves.balloon.ViewExtensionKt.circularUnRevealed(ViewExtensionKt.java:58)
       at com.skydoves.balloon.Balloon.dismiss(Balloon.java:485)
       at com.skydoves.balloon.Balloon$dismissWithDelay$1.run(Balloon.java:496)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6944)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
ghost commented 4 years ago

Another user got this error. Any idea what is causing this?

Fatal Exception: java.lang.IllegalStateException: Cannot start this animator on a detached view!
       at android.graphics.RenderNode.addAnimator(RenderNode.java:1458)
       at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:316)
       at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:295)
       at android.animation.RevealAnimator.<init>(RevealAnimator.java:37)
       at android.view.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:71)
       at com.skydoves.balloon.ViewExtensionKt.circularUnRevealed(ViewExtensionKt.java:58)
       at com.skydoves.balloon.Balloon.dismiss(Balloon.java:485)
       at com.skydoves.balloon.Balloon$dismissWithDelay$1.run(Balloon.java:496)
       at android.os.Handler.handleCallback(Handler.java:888)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:213)
       at android.app.ActivityThread.main(ActivityThread.java:8147)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
skydoves commented 4 years ago

It seems it is cuased from the circular revealed animation. I will check out it soon.

ghost commented 4 years ago

Thanks

skydoves commented 4 years ago

@Amosss Hi, it is fixed on version 1.1.4. Thanks for your issue :)

ghost commented 4 years ago

Oh, great, thank you for fixing my issue :)