Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Make it so that AlertDialog.Builder.SetOnCancelListener accepts a delegate/lambda #240

Open
WashingtonARamos opened this issue May 25, 2020 · 0 comments
Assignees
Labels
feature-request investigating Currently investigating issue not-an-issue Question answered, or not actually an issue not-on-roadmap Not currently planned

Comments

@WashingtonARamos
Copy link

Android.Support.V7.App.AlertDialog.Builder has 4 interesting methods: SetPositiveButton(string, EventHandler<DialogClickEventArgs>), SetNeutralButton(string, EventHandler<DialogClickEventArgs>), SetNegativeButton(string, EventHandler<DialogClickEventArgs>) and SetOnCancelListener(IDialogInterfaceOnCancelListener). While the first 3 make it easy for the developer to set an action for the user input (I can just say SetPositiveButton("Confirm", delegate { MyAction(); }), the fourth one requires the developer to create a class that implements IDialogInterfaceOnCancelListener and implement just this one method OnCancel(IDialogInterface). It would be very helpful if we could do with SetOnCancelListener the same that we do with the others, that being just setting a delegate as the action, for example SetOnCancelListener(delegate { MyAction(); }).

@grendello grendello assigned jpobst and moljac and unassigned jpobst May 28, 2020
@grendello grendello transferred this issue from dotnet/android May 28, 2020
@moljac moljac added feature-request investigating Currently investigating issue not-an-issue Question answered, or not actually an issue not-on-roadmap Not currently planned labels May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request investigating Currently investigating issue not-an-issue Question answered, or not actually an issue not-on-roadmap Not currently planned
Projects
None yet
Development

No branches or pull requests

3 participants