tEditText.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "完成",
Toast.LENGTH_SHORT).show();
return false;
}
});
这样就会在输入完成并点击了键盘的完成键后,再进行函数里的操作