[mono-android] Alert box
jsmoot at email.com
jsmoot at email.com
Mon Mar 28 23:11:10 EDT 2011
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();
More information about the Monodroid
mailing list