editText.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if(actionId == EditorInfo.IME_ACTION_DONE) {
//todo
}
return false;
}
android:layout_width="match_parent"
android:layout_height="wrap_content"