Android之输入内容监听回车键Editor

【Android之输入内容监听回车键Editor】盛年不重来,一日难再晨,及时当勉励,岁月不待人。这篇文章主要讲述Android之输入内容监听回车键Editor相关的知识,希望能为你提供帮助。
2.输入内容时按下回车键时监听


username.setOnEditorActionListener(new OnEditorActionListener() {


@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
// TODO Auto-generated method stub
Toast.makeText(MainActivity.this, " onEditorAction" ,1).show();
return false;
}
});












    推荐阅读