androidtouchtouchscreen

Screen sensitivity across Android devices


I have encountered a really weird scenario during my tests and maybe you can light me.

Scenario: The application consists in a Surfaceview in which I handle the touch event. I have a image on the screen and the user put's his finger on it and then takes it back. Just like a short button pressing.

What goes wrong:

Samsung Galaxy S with SuperAmoled screen - the touch events fired are: Down and then Up. just like it is normally

Nexus One, Desire - the touch events fired are: Down, Move, Move, Up The move gesture is small like +- 1 px but there is. Now imagine the fact that I have code that is fired in Move event.

So testing on my Galaxy S everything works wonderful, testing on Nexus it fails as it doesn't react as supposed to.

My Questions:


Solution

  • Use boolean flag to prevent code to run in Move Event by setting flag to true in down event and then call the methods.