I have this EditText
<EditText
android:layout_width="match_parent"
android:layout_height="72dp"
android:hint="@string/write_message"
android:textColorHint="@color/primary_color"
android:ems="10"
android:imeOptions="actionDone"
android:inputType="textImeMultiLine"
android:id="@+id/message_input"
android:layout_gravity="center_horizontal"
android:backgroundTint="@color/primary_color"/>
When the box is filled up with user inputted text, it scrolls to the right to make room for more text, I do not like this behavior, and would prefer it if the EditText box expanded upwards when it needs more room? Is there a way to do this? Thanks.
Yes, this actually involves two things:
EditText
accept multi-line input.Therefore, to achieve this, you need to set up:
(Be mindful of the difference between
textMultiLine
andtextImeMultiLine
).The full XML snippet would be: