本文共 499 字,大约阅读时间需要 1 分钟。
android监听软键盘enter按键,网上找了几个方案都不好使,自己打印日志,得出下面这个方式
et.setImeOptions(EditorInfo.IME_ACTION_SEND); etNum.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) { if ((!T.isFastClick() &&actionId==EditorInfo.IME_ACTION_SEND)) { login(); return true; } return false; } });
转载地址:http://jfcgi.baihongyu.com/