forked from hussien89aa/XamarinAndroidTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlert.cs
More file actions
19 lines (16 loc) · 653 Bytes
/
Alert.cs
File metadata and controls
19 lines (16 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// On "Call" button click, try to dial phone number.
var callDialog = new AlertDialog.Builder(this);
callDialog.SetTitle("Notify");
callDialog.SetMessage("Call me know");
callDialog.SetNeutralButton("Call", delegate {
});
callDialog.SetNegativeButton("Cancel", delegate { });
callDialog.SetPositiveButton("Yes", delegate { });
callDialog.Show();
// this is equal
delegate { }=(senderAlert, args) => {}
// run on ui thread
//run the alert in UI thread to display in the screen
RunOnUiThread (() => {
alert.Show();
} );