android - When should a soft keyboard show an enter key? -


this separate whether app has requested editor action: editor action displayed replacement enter key, it's possible input method offer both alternatives.

the simple answer is, of course, "when it's possible enter newline". when textview in single-line mode, it's not possible enter newline if keyboard shows key: found in this answer, android treats key editor action , substitutes zero-width space newlines added textview.

how can input method tell whether newlines respected, or otherwise whether it's appropriate show enter key (as alternative specified editor action)?

your best bet check editorinfo object returned using getcurrentinputeditorinfo() , take best guess if showing enter key apt or not.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -