Here's a hint - override public boolean dispatchTouchEvent(MotionEvent ev) instead of onTouchEvent - this *does* save quite a few cycles. You sleep using whatever you find more appropriate - Thread.sleep for interruptible sleep or SystemClock.sleep for non-interruptible one.
HTH, Stoyan On Thu, Feb 19, 2009 at 9:00 AM, Zombies and Robots <[email protected]> wrote: > > I am also developing games which may make heavy use of onTouchEvent(), > so this thread looks very helpful to me as well. > > I've been trying to follow everything you guys have been talking > about, but I must admit that after trying several ways of implementing > what you suggest, I still haven't been able to achieve any positive > results. Could one of you provide some example code? Specifically, > I'd like to know how to go about making the main/UI thread sleep. If > it's applicable to my games, it would also be nice to know how to set > up a polling model like Jon implemented. > > Of course, I greatly appreciate any help! > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

