Try using this android:lines="1" in your xml layout for EditText.
This will consider Enter Key as a new line, and the focus will not disappear. Although existing text may not be displayed due to only one line, as it moves the rising word and hides.
source share