How to have a ContextMenu on the GLSurfaceView :?

Started by Darkflame, September 06, 2010, 01:00:18 PM

Previous topic - Next topic

Darkflame

Probably a real newbie question, but I'm having a little trouble working out how to have a context menu working
in my GLSurfaceView view.
There doesn't seem to be a "onCreateOptionsMenu" or
"onOptionsItemSelected" to override. (or its protected)

I do notice a "setOnCreateContextMenuListener" but I don't know how to
use it.
Anyone know?

raft

i guess onCreateOptionsMenu() and other similar methods are in Activity, not in View. so you should override it in your activity

EgonOlsen

Just make sure that, if you want to programmatically trigger GUI related work from inside the GL thread, you are creating a Handler in the GUI thread to post the actual workload to in form of a Runnable. Otherwise, Android will complain that you work with GUI components from outside the GUI thread.