How to implement Multiline EditText with ActionDone button (without Enter button)
I have EditText which is used for entering contents on messages (emails, sms). I want message to be immediately posted on ActionDone button click. I use following code for this: message.setOnEditorActionListener((textView, i, keyEvent) -> { switch (i) { case EditorInfo.IME_ACTION_DONE: if (messageCanBePosted()) { SoftKeyboard.hide(message); postMessage(); return true; } else { return false; } default: return false; } }); But also I want this message field to be multiline, like in any other messenger apps. I can achieve it with this line: android:inputType="textMultiLine" The problem is that