我是 android 的新手并且有以下问题:这是代码:
base.OnCreate(bundle);
var layout = FindViewById<LinearLayout>(Resource.Id.layout1);
Button butondata = FindViewById<Button>(Resource.Id.button3);
Button butonstartdate = FindViewById<Button>(Resource.Id.button4);
Button butonenddate = FindViewById<Button>(Resource.Id.button5);
EditText txtsubiect = FindViewById<EditText>(Resource.Id.editText1);
Button submit = FindViewById<Button>(Resource.Id.buttonsalveaza);
butondata.Click += butondata_Click;
submit.Click += (sender, e) =>
{
txtsubiect.TextChanged += (object sender1, Android.Text.TextChangedEventArgs f) =>
{
if (txtsubiect.Text.Length <= 0)
{
txtsubiect.RequestFocus();
txtsubiect.SetError("Eroare,camp gol!");
}
};
};
当我构建它时,它说:方法'SetError'没有重载需要1个参数,有什么问题,因为我有点困惑,错误消息会出现吗?谢谢!