是否有可能同时拥有一个EditText具有android:inputType="textMultiLine"集合的小部件android:imeOptions="actionDone"?
我想要一个多行编辑框,键盘上的动作按钮完成,而不是回车(回车),但它似乎没有工作..
提前致谢
我完全不知道在EditText控件上为imeOption设置"actionSearch"实现一个动作监听器.
我已经查看了Android文档,但我在Mono中找不到对它的支持.我已经尝试实现TextView.IOnEditorActionListener,但我找不到要覆盖的OnEditorAction方法.
这是我正在尝试使用的代码:
EditText editText = (EditText) findViewById(R.id.search);
editText.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
boolean handled = false;
if (actionId == EditorInfo.IME_ACTION_SEND) {
sendMessage();
handled = true;
}
return handled;
}
});
Run Code Online (Sandbox Code Playgroud)
一切都很好,直到我尝试设置动作监听器,Mono中没有我能找到的OnEditorActionListener,在它的位置它要求TextView.IOnEditorActionListener,我找不到任何显示你将如何在Mono中接近它的东西.这是不支持的,还是有办法在Mono for Android应用程序中获得此功能?
感谢您提供的任何帮助.