Closed huuchi207 closed 7 years ago
By default, the ParticleSystem creates a full screen transparent view that is attached to the content view of the Activity as a first child - that is, on the very background -
To change that behaviour, you can provide another View as the parent, so the particle system can have views behind it. have you tried that?
"you can provide another View as the parent". How can I try that? Can u give me an example code? In my code, imageView = (ImageView) rootView.findViewById(R.id.imageView). It's Dialog Fragment's View.
I can't find out the constructor as you mention in documentation 's lib: " And another constructor that receives a parent viewgroup and drawable for use in places where it is not practical to pass a reference to an Activity
ParticleSystem(ViewGroup parentView, int maxParticles, Drawable drawable, long timeToLive)"
yes, that is the constructor you want to use. Yes, it is a ViewGroup, not a View, sorry I was talking from memory.
here is particle system 's contructors list. None of them has ViewGroup argument :(
Are you sure you are using the latest published version? It is one of the release notes https://github.com/plattysoft/Leonids/releases/tag/1.3.2
and you can see it in the code of that particular tag: https://github.com/plattysoft/Leonids/blob/1.3.2/LeonidsLib/src/main/java/com/plattysoft/leonids/ParticleSystem.java#L88
ok let me try your suggest. Please change your construction 's setup section. It 's still guiding version 1.3.1 :D
i solved my problem by using version 1.3.2. Thank you for your lib and your solution!
i use this code in DialogFragment:
but the effect shows in Activity(behind Dialog) :(