In general, you shouldn't be starting an activity at all passed on
movements.  Probably  not on downs either.  Only on ups.  And at that point,
if you want to abort the operation based on movement, just look at how far
the up event x and y is away from the original down event.

On Mon, Apr 13, 2009 at 5:04 AM, quakeboy <[email protected]> wrote:

>
> can u give some sample code, technical details about that touch
> thresholding, I have been trying to implement and I am missing
> important events
>
> On Apr 13, 7:07 am, Ralf <[email protected]> wrote:
> > On Sun, Apr 12, 2009 at 6:28 PM, Todd Sjolander <[email protected]>
> 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.
> >
> > Ah indeed. Remember that touch on the emulator, via the mouse, is a
> > very precise operation -- you click one pixel, once. On a real device
> > your finger generates lots of input events due to the imprecision of
> > the point being touched, pressure, etc. If you real on a precise
> > touch, you might want to implement a threshold in your touch listener
> > to filter out noise.
> >
> > R/
> >
> >
> >
> > > Jon, I've seen some oddities from that myself, although I can't really
> > > make sense of it.  But it's helpful to keep that in mind.
> >
> > > Thanks!
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to