Yes, this actually includes two things:
- Performing
EditText accepting multi-line input. - Increase its height when adding more text strings.
Therefore, to achieve this goal you need to configure:
android:inputType="textMultiLine" android:layout_height="wrap_content"
(remember the difference between textMultiLine and textImeMultiLine ).
Full XML snippet:
<EditText android:layout_width="match_parent" android:inputType="textMultiLine" android:layout_height="wrap_content" android:hint="@string/write_message" android:textColorHint="@color/primary_color" android:ems="10" android:imeOptions="actionDone" android:id="@+id/message_input" android:layout_gravity="center_horizontal" android:backgroundTint="@color/primary_color"/>
source share