奶霸000

导航

android editText 监听事件

在软键盘中注意

在监听的 edittext中 

使用android:imeOptions属性的时候,一定要对EditText设置 android:inputType 或者 设置 android:singleline=”true”

 

 

在activity_main.xml文件中,定义了8个EditText,imeOptions分别是: 
actionDone 完成 对应 EditorInfo.IME_ACTION_DONE 
actionGo 前进 对应 EditorInfo.IME_ACTION_GO 
actionNext 下一项 对应 EditorInfo.IME_ACTION_NEXT 
actionNone 无动作 对应 EditorInfo.IME_ACTION_NONE 
actionPrevious 上一项 对应 EditorInfo.IME_ACTION_PREVIOUS 
actionSearch 搜索 对应 EditorInfo.IME_ACTION_SEARCH 
actionUnspecified 未指定 对应 EditorInfo.IME_ACTION_UNSPECIFIED 
actionSend 发送 对应 EditorInfo.IME_ACTION_SEND

监听方法

 

posted on 2016-12-21 21:58  奶霸000  阅读(2684)  评论(0编辑  收藏  举报