Thanks I got it sorted now :) I knew how to create a menu, but I thought I could just create a menu on another view in order to have it view-specific. I didn't spot I could just get the parameter of the view that triggered it. Cheers,
On 6 September 2010 14:02, Miguel Morales <[email protected]> wrote: > Override onCreateOptionsMenu() in your activity class like so: > > @Override > public boolean onCreateOptionsMenu(Menu menu) > { > menu.add(0, 1, 0, "Item1"); > menu.add(0, 2, 0, "Item1"); > return true; > } > > Should work automatically with your canvas view. > > On Mon, Sep 6, 2010 at 4:18 AM, ThomasWrobel <[email protected]> wrote: >> Override what? "setOnCreateContextMenuListener" ? Its parameters are >> different. >> >> On Sep 6, 12:54 pm, Miguel Morales <[email protected]> wrote: >>> Override those on your Activity class. >>> >>> >>> >>> On Mon, Sep 6, 2010 at 3:52 AM, ThomasWrobel <[email protected]> wrote: >>> > 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. >>> >>> > I do notice a "setOnCreateContextMenuListener" but I don't know how to >>> > use it. >>> >>> > Anyone know? >>> >>> > -- >>> > 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 >> >> -- >> 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 > > > > -- > ~ Jeremiah:9:23-24 > Android 2D MMORPG: http://developingthedream.blogspot.com/, > http://diastrofunk.com, > http://www.youtube.com/user/revoltingx > > -- > 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 -- 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

