Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created November 4, 2010 19:11
Show Gist options
  • Save mgroves/662989 to your computer and use it in GitHub Desktop.
Save mgroves/662989 to your computer and use it in GitHub Desktop.
void tr_LongClick(object sender, Android.Views.View.LongClickEventArgs e)
{
longClickOptions = new IList<char>[] {"Edit".ToCharArray(), "Delete".ToCharArray()};
var dialogBuilder = new AlertDialog.Builder(this);
dialogBuilder.SetTitle("Options");
dialogBuilder.SetItems(longClickOptions, tr_LongClick_Options);
dialogBuilder.Create().Show();
}
private void tr_LongClick_Options(object sender, DialogClickEventArgs e)
{
Toast.MakeText(this, "Option: " + longClickOptions[e.Which], ToastLength.Long).Show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment