Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particles stuck on screen after stopEmitting() and few fragment transactions #69

Open
stfbee opened this issue Jan 19, 2017 · 4 comments

Comments

@stfbee
Copy link

stfbee commented Jan 19, 2017

  1. Start emission
  2. Stop it
  3. Switch some fragments while the particles are still there on the screen
  4. After few switches they are stuck on screen and they are not deleted on next emission start.

Bug occurs on version 1.3.2. On 1.3.1 all right.

@plattysoft
Copy link
Owner

Thanks for the heads up. This is an interesting bug.

So, in principle the particles should not stop when the emitter stops because they need to do the lifecycle. This is shown on the follow touch example.

Now, what happens here is that some of the components get disconnected when paused and do not get reconnected when resumed. Most likely the timers.

Since I always used it on Activities that finish, this is not something I've seen before.

I would need to look at the lifecycle of fragments to see how to fix it properly, but I do not have time for that at the moment.

I hope I have given you any hint on how to solve it yourself.

@stfbee
Copy link
Author

stfbee commented Jan 23, 2017 via email

@mujeebwazir
Copy link

i have the same issue too and i m explaining this as;

  1. Do not show animation while using in oncreate() and then it works after opening the app several times.
  2. Unable to stop or cancel animation in the same activity.

@sarantist
Copy link

stopEmitting () Stops the emission of new particles, but the active ones are updated.

cancel () Stops the emission of new particles and cancles the active ones.

cancel() will clear any stuck particles on the Fragment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants