Save a MotionEvent for latter processing
<p>I'm starting with a 2D game.</p>

<p>I followed the hints of the book "Beginning Android 4 Games Development", there the autor process each MotionEvent,transform the touch from the screen coordinates to the game coordinates, create its own "TouchEvent" and store it in a pool for being processed with the next UI refresh.</p>

<p>The problem is that then I can't use the TouchEvent with an GestureDetector for example. So I'm considering o rewrite that part and make something like.</p>

<pre><code>public boolean onTouch(View v, MotionEvent event) {
    MotionEvent gameEvent= MotionEvent.obtain(event);
    int x=tranformToGameCoords(event.getX());
    int y=tranformToGameCoords(event.getY());
    gameEvent.setLocation(x, y);
    addToBuffer(gameEvent);
    return true;
}
</code></pre>

<p>And then for consuming the events:</p>

<pre><code>while((event=getEventFromBuffer())!=null){
  consume(event);
  event.recycle();
}
</code></pre>

<p>Is that approach correct? If not whats the best solution for that problem?</p>
