Search code examples
androidandroid-edittextmultilineandroid-textinputedittextandroid-inputtype

What difference between textMultiLine and textImeMultiLine in inputType EditText?


I am trying to understand the difference between the textMultiLine and textImeMultiLine options for android:inputType in an EditText. However I have not been able to understand an answer. The documentation says

IME is a control enabling users to enter text.


but I don't understand how texMultiLine is different from textImeMultiLine.


Solution

  • TextImeMultiLine: Flag for TYPE_CLASS_TEXT: the regular text view associated with this should not be multi-line,

    but when a fullscreen input method is providing text it should use multiple lines if it can.

    TextMultiLine: Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field. If this flag is not set, the text field will be constrained to a single line. The IME may also choose not to display an enter key when this flag is not set, as there should be no need to create new lines.