Open akshaylamba opened 7 years ago
A ViewGroup is something as simple as a FrameLayout or a RelativeLayout. If your list items have one of those as the top level element, it should be ok.
However I suggest giving the top level view an id and getting it by Id.
It may be confusing if the view moves and the particle system does not. There may be some side effects or unexpected behaviours. Putting particle effects on items on a ListView is not something I had tested or planned for. It may as well behave properly.
I have Relative Layout in my Recycler View as My Recycler View is attached to a Custom Layout with Contains the Relative Layout representing each row in recycler view.... How should I call the Relative Layout in the Below code...
ParticleSystem ps = new ParticleSystem(holder.itemView.getContext(), 50, R.drawable.emoji_1f358, 1000);
ps.setSpeedRange(0.1f, 0.25f);
ps.setScaleRange(0.7f, 1.3f);
ps.setSpeedRange(0.1f, 0.25f);
ps.setAcceleration(0.0001f, 90);
ps.setRotationSpeedRange(90, 180);
ps.setFadeOut(200, new AccelerateInterpolator());
ps.emit(v, 100)
Hi all, I wake up this old issue having the same issue as above. I'm trying to attach to top framelayout of my cardview but nothing is displayed:
(I do that in a click listener belonging to a button of my cardview)
ViewGroup mygroup = (ViewGroup) itemView.findViewById(R.id.background_hook);
new ParticleSystem(mygroup, 80, ContextCompat.getDrawable(itemView.getContext(), R.drawable.ic_raindrop_24dp), 10000)
.setSpeedByComponentsRange(0f, 0f, 0.05f, 0.1f)
.setAcceleration(0.00005f, 90)
.emitWithGravity(itemView.findViewById(R.id.button1), Gravity.BOTTOM, 8);
And what is the behaviour if we scroll the list? The particles stay in the item view?
0 down vote favorite
I am trying to Using Particle system
I am Trying to Use it in a MyAdapter File in the below function :-
This is Giving me an Build error as Below :-
I also tried using
But Got an error saying