Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Context menu from options menu?

$
0
0

First of probably a lot of n00b questions, I'm afraid - I'm a complete beginner with Android and Xamarin.

I'd like to show a context menu as follows:

  • when an options menu item is selected
  • with a single click, not a long click

Is this possible? I've seen several examples of attaching context menus to other screen elements such as buttons, but this won't compile:

public override bool OnCreateOptionsMenu(IMenu menu)
{
    myMenuItem = menu.Add(0,0,0,"My Menu Item");
    RegisterForContextMenu(myMenuItem);
// etc
}

If it's not possible is there an alternative way of having a menu popup when an options item is selected?


Viewing all articles
Browse latest Browse all 204402

Trending Articles