Reputation: 65
When I'm pressing "enter" on the keyboard, the EditText space is creating a new line and raising the space of EditText, disturbing my app layout. How can I stop this?
Thanks!
Upvotes: 2
Views: 3557
Reputation: 1029
Try this when using TextInputEditText
android:inputType="text"
android:maxLines="1"
Upvotes: 3
Reputation: 3916
These 3 flags will solve your issue. Add them to your edit text view.
android:inputType="text"
android:imeOptions="actionNext"
android:maxLines="1"
Upvotes: 4
Reputation: 270
Make sure you set the attribute inputType of the EditText to text like
android:inputType="text"
Upvotes: 2