Hi Wit,

No, you need to use check the event code for DOWN, MOVED, UP. It works
just fine in the emulator, I have used it! All you need to do is set a
boolean to TRUE when touch is DOWN, then in the MOVED, if that bool is
TRUE then get the new X,Y and move. Then in UP set the bool to FALSE
to turn off movement of your object.

-niko

On Oct 17, 5:06 am, wit <[email protected]> wrote:
> Hello there, fellow Androidevs!
>
> I am trying to test an app which relies on onTouchEvent of a custom
> (subclased) View. In particular I want to be able to track if the user
> "touched" an object and "moves" the finger across the screen (so that
> the object follows his finger).
>
> This app is almost impossible to test with emulator as it seems to me.
> onTouchEvent only responds to a single click event of the mouse. Mouse
> motion (while in pressed state) does not fire the onTouchEvent.
>
> Am I doomed now? :-)
>
> - Wit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to