我在 Mono for Android 中构建一个对话框,如下所示:
AlertDialog.Builder builder = new AlertDialog.Builder(Context);
builder.SetTitle(Context.GetString(Resource.String.MyTitle));
builder.SetMessage(Context.GetString(Resource.String.MyQuestion);
//YES, not OK
builder.SetPositiveButton(Android.Resource.String.Yes, new EventHandler<DialogClickEventArgs>((dlgSender, dlgEvt) => { doSomething();});
builder.SetNegativeButton(Context.GetString(Android.Resource.String.No), new EventHandler<DialogClickEventArgs>((dlgSender, dlgEvt) => { doSomethingElse();}));
builder.SetNeutralButton(Context.GetString(Android.Resource.String.Cancel),
new EventHandler<DialogClickEventArgs>((dlgSender, dlgEvt) => {}));
Dialog dialog = builder.Create();
dialog.Show();
这用三个按钮提出了我的问题:"Cancel, Cancel, Ok"而我希望得到"No, Cancel, Yes"。我上面的代码有什么问题,或者这里的 Mono for Android 有什么问题吗?