[mono-android] Alert box

jsmoot at email.com jsmoot at email.com
Mon Mar 28 23:22:38 EDT 2011


Thanks! I have ben beating myself  up on the alert box.

Smoot


-----Original Message-----
From: Greg Shackles <gshackles at gmail.com>
To: monodroid at lists.ximian.com
Sent: Mon, Mar 28, 2011 8:14 pm
Subject: Re: [mono-android] Alert box


I have a sample up 
here: https://github.com/gshackles/Sample-Projects/blob/master/MonoDroid/
MonoDroidSamples/MonoDroidSamples/DemoActivities/TextNotify/TextNotifyAct
ivity.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




_______________________________________________
Monodroid mailing list
Monodroid at lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


More information about the Monodroid mailing list