views:

9

answers:

0

Hi

I have a gesture activity class that listens out for when a gesture is performed on screen, which is connected to a GestureOverlayView which covers the entire screen. I have a main game thread DistractionsThread that is launched from the Distractions menu file. The thread deals with the physics and do draw methods that play the game so once created, control is passed to it until it exits or is interrupted.

My question is, how can I have both the gesture activity and DistractionsThread running at the same time so that the game listens out for gestures whilst continuing to play, as opposed to waiting for one activity to finish before the other resumes.

I imagine this will involve a second thread but am unsure how to implement this correctly? The gesture activity has to be an activity type I assume by virtue of it using a view?