editText.setOnEditorActionListener
来源:互联网 发布:教育大数据平台 编辑:程序博客网 时间:2024/06/03 11:44
editText.setOnEditorActionListener(new OnEditorActionListener(){
@Override
public boolean onEditorAction(TextView v,int actionId,KeyEvent event){
return false;
}
});
编辑完成后点击软件盘回车键触发.
查阅android sdk说明
/**
* Set a special listener to be called when an action is performed
* on the text view. This will be called when the enter key is pressed,
* or when an action supplied to the IME is selected by the user. Setting
* this means that the normal hard key event will not insert a newline
* into the text view, even if it is multi-line; holding down the ALT
* modifier will, however, allow the user to insert a newline character.
*/
设置在文本视图上执行操作时调用的特殊侦听器。
当按下enter键时,或当向IME提供的操作被用户选中时,将调用此操作。
设置这意味着正常的硬键事件不会在文本视图中插入新行,即使它是多行的;
然而,按住ALT修饰符将允许用户插入换行符。
- editText.setOnEditorActionListener
- EditText、requestFocus、imeOptions、TextWatcher、setOnEditorActionListener
- android控件EditText的setOnEditorActionListener方法理解
- EditText监听事件setOnEditorActionListener onEditorAction执行两次
- 控件EditText的setOnEditorActionListener方法的理解
- 控件EditText的setOnEditorActionListener方法的理解
- 控件EditText的setOnEditorActionListener方法的使用
- EditText中setOnEditorActionListener方法的使用
- EditText的setOnEditorActionListener方法的使用
- 控件EditText的setOnEditorActionListener方法的理解
- (转)控件EditText的setOnEditorActionListener方法的理解
- android EditText imeOptions属性和各属性setOnEditorActionListener
- 输入框点击完成按钮,setOnEditorActionListener用法
- EditText
- EditText
- EditText
- EditText
- EditText
- BAT面试题精选 | 一个完整机器学习项目的流程(视频)
- 应用TF-Slim快速实现迁移学习
- OS学习笔记——哲学家进餐问题
- c++ 关于map的遍历 删除(转载)
- PHP利用qrcorde生成二维码详解
- editText.setOnEditorActionListener
- PHP中 static 与 const 变量的区别
- Kata系列之排序算法的选择排序
- BeanUtils.copyProperties()用法
- 8. PIBOT的Firmware的代码分析(2)
- 编写智能合约
- IDEA配置Maven
- 3D控件Aspose.3D 12月新版V17.12发布 | 添加支持导出RVM
- JAVA读写XML配置文件