2016-09-06 70 views

回答

1

試試這個:

//var aletDialog = new 
    Android.App.AlertDialog.Builder alert = new Android.App.AlertDialog.Builder(this); 
    alert.SetTitle("Confirm delete"); 
    alert.SetMessage("Lorem ipsum dolor sit amet, consectetuer adipiscing elit."); 
    alert.SetPositiveButton("OK", (senderAlert, args) => { 
     Toast.MakeText(this, "Ok button Tapped!", ToastLength.Short).Show(); 
    }); 

    Dialog dialog = alert.Create(); 
    dialog.Window.SetType(Android.Views.WindowManagerTypes.SystemAlert); 
    dialog.Show(); 
+0

如果從簡單的類需要顯示系統警告,你不能使用什麼樣的情況下「本」。你將如何創建系統警報? –