hi,

because glsurfaceview uses 2 threads to handle UI and rendering, to
reduce flickring, i need to pass a motionevent from the ui thread to
the render thread.

this is documented here at the official reference:

http://developer.android.com/reference/android/opengl/GLSurfaceView.html#queueEvent%28java.lang.Runnable%29

my current code looks like this:

        public boolean onTouchEvent(final MotionEvent event) {

                Log.d("surfaceview Action:",event.getAction()+";");

                queueEvent(new Runnable() {
                        public void run() {
                                renderer.debugevent(event.getAction());

                        }
                });
                return true;
        }


but the problem is, if the event.getAction()==0, which means a touch
down event, the function renderer.debugevent(event.getAction()); will
not be executed.

there must be something wrong with queueEvent.

is this a known bug or something? is there any solution? thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to