你可以在一个DisplayAlert中多出一行吗?

问题描述:

所以我有这个代码,我在想如果你可以有更多的一行文本?你可以在一个DisplayAlert中多出一行吗?

正在等待DisplayAlert(“Contact”,“Name:”+ Contact.Fullname,“Close”);

我allso想电子邮件和年龄显示

+0

尝试使用\ n警报消息中 – Rob85

DisplayAlert("Contact","Name: " + Contact.Fullname + "\nAddress: " + Contact.Address + "\nEmail: " + Contact.Email + "\nAge: " + Contact.Age, "Close"); 

String contact_str = "Contact: " + name; 
String email_str = "Address: " + email; 
String age_str = "Age: " + age; 
DisplayAlert(contact_str +"\n"+ email_str +"\n"+ age_str);