Soumyakant Mishra
Soumyakant Mishra

Reputation: 73

how to make EditText field grow horizontally instead of vertically in android app

I have an edittext field. As I type and characters exceed the maxlength of it there appears a new row to continue typing. However, I want to avoid this behavior since there is map below it which is going down relatively.

I don't want to restrict the maxlength as well. Can someone explain how do I solve this problem?

Upvotes: 0

Views: 473

Answers (2)

DecodeGnome
DecodeGnome

Reputation: 1809

Correct me if Im wrong, but is't singleLine="true" depricated?

android:lines="1"

Upvotes: 0

mudit
mudit

Reputation: 25536

define following parameters in your xml under the edittext tag:

android:singleLine="true"

Upvotes: 1

Related Questions