Events are recycled. You're passed a reference to the event, and you're adding a reference to your queue. The event will be recycled, so your reference points to a new event that was recycled using the old event.
If you're lucky.
Events are recycled. You're passed a reference to the event, and you're adding a reference to your queue. The event will be recycled, so your reference points to a new event that was recycled using the old event.
If you're lucky. You shouldn't use the event after the execution of onTouchEvent has finished. If you need to store some of its data persistently, copy it to your own structure (or clone the event, if that's possible).
As to your other question - only the UI thread handles touch events, so having multiple threads shouldn't matter (unless of course you use those other threads to torpedo your queue).
Ah that was it! Thanks for the info. Also, you can clone a MotionEvent using MotionEvent.
Obtain(event) which returns a new MotionEvent based off of event. – StickFigs May 26 '11 at 4:25 Actually somehow the new MotionEvent ends up with the same id as the old one... – StickFigs May 26 '11 at 4:40 I wouldn't recycle the event that's passed in. Leave that up to the framework.
– EboMike May 27 '11 at 4:18.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.