On Sun, Apr 12, 2009 at 6:28 PM, Todd Sjolander <guyfantas...@gmail.com> wrote: > > Marco, your hunch was right. I was somehow creating multiple copies > of Activity C. In case anyone can benefit from this, let me explain > how it went wrong. > > I implemented onTouch() in Activity B, which would create an Intent > for Activity C, and then call startActivity(). For some reason, > onTouch() would get called multiple times with each touch, launching a > new Activity C each time.
Yes, the onTouchEvent() method will usually be called multiple times on an actual device, since you can't hold your finger completely still, and so you will get a continuous stream of 'move' events following the 'down' event. You should only get one 'down' event though, so you could always check whether the event was a down event, and only start activity C when it is. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---