我正在使用此代码检测从 monotouch.dialog 中输入元素的键盘返回。
RltEntryElement createServerUrlEntry(){
try {
ServerNameEntryElement = new EntryElement ("Website url","placeholder",
"value");
ServerNameEntryElement .ReturnKeyType = UIReturnKeyType .Done ;
ServerNameEntryElement.ShouldReturn += ShouldReturnMethd;
return ServerNameEntryElement ;
} catch (Exception ex) {
RltLog .HandleException (ex);
return null ;
}
}
public bool ShouldReturnMethd ()
{
RltLog .LogInfo ("Helllllllllllllo");
return false ;
}
它可以工作并"Helllllllllllllo"
在按下 'Done' 后记录。但键盘并没有消失。我应该用它来正确地工作吗?