rl_search.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {
// TODO Auto-generated method stub
if (arg1 == EditorInfo.IME_ACTION_SEARCH || (arg2 != null && arg2.getKeyCode() == KeyEvent.KEYCODE_ENTER && arg2.getAction() == KeyEvent.ACTION_DOWN)) {
// 先隐藏键盘
((InputMethodManager) rl_search.getContext().getSystemService(Context
EditText 回车键确认键按下事件监听
最新推荐文章于 2024-04-23 08:30:00 发布