[mono-android] Alert box
Greg Shackles
gshackles at gmail.com
Mon Mar 28 23:14:45 EDT 2011
I have a sample up here:
https://github.com/gshackles/Sample-Projects/blob/master/MonoDroid/MonoDroidSamples/MonoDroidSamples/DemoActivities/TextNotify/TextNotifyActivity.cs#L33
On Mon, Mar 28, 2011 at 11:11 PM, <jsmoot at email.com> wrote:
> Can someone give me the code to create a alertbox with buttons. I have
> seen the java versions but can't get the event to work in c# on the
> button.
>
> Any help woule be great. code juing java
>
> // prepare the alert box
> AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
>
> // set the message to display
> alertbox.setMessage("This is the alertbox
>
> // add a neutral button to the alert box and assign a click listener
> alertbox.setNeutralButton("Ok", new
> DialogInterface.OnClickListener() {
>
> // click listener on the alert box
> public void onClick(DialogInterface arg0, int arg1) {
> // the button was clicked
> }
>
> });
> // show it
> alertbox.show();
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110328/618dde6a/attachment.html
More information about the Monodroid
mailing list