button.setonclicklistener(new onclicklister()
{
onclick()
{
openContextMenu(this);
}
})On 5/9/12, Jason Teagle <[email protected]> wrote: >>I tried as the same in the example defined here . but didn't get the >>menu displayed . >> >>did not work - i am not getting the conext menu at all after clicking >>button . > > OK. At this point I would recommend (for test purposes) you leave your > existing project alone, start a new project with a new activity, add one > button to the layout, and try adding the necessary code to add and show the > context menu to the button. If it still doesn't work in a fresh project > (which should be nice and small since it only has the one button and handler > in it), then post your code here for us to look at. > > > -- > 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

