Why are touch events destroying my Android framerate? -
I'm developing a game for Android. This is going on very well but it is running smoothly. This is definitely, as long as the user does not touch the screen.
When they are touching it, then onTouchEvent (with action = ACTION_MOVE ) x = 0 and < Code> y = 0 ) appears roughly every ten milliseconds as a very high priority, because it completely breaks the framerate as soon as the touch ends the framerate return in its good state is.
I've tried
-
onTouchEventto be a game normally in the form of input -
onTouchEvent <Keeps maintained.
Has anyone ever had to face it? Is there a way to reduce the rate at which the
ACTION_MOVEevents occur, or to ensure that when there is a real movement, or use only one polling method, which is just the current location Are you touching? Or is there a way to disable it altogether?
This thread is basically you want to sleep in the event thread because otherwise the system will pump many events (X , There is always some movement between Y and pressure) which you need to handle.
Comments
Post a Comment