Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make EditText hint not to wrap?

I have a one line EditText, when I set a long hint, the hint wraps to two lines. Can I force the EditText to be always one line tall? android:lines="1" didn't work.

like image 561
fhucho Avatar asked Oct 18 '10 10:10

fhucho


2 Answers

Have you tried android:ellipsize yet? This can be set to truncate the line to end in "..." either at the start, the middle, the end, or you can set it to marquee (scroll across). Not sure offhand whether this applies to hints or not, but it should.

like image 136
Kevin Coppock Avatar answered Oct 23 '22 17:10

Kevin Coppock


Try android:singleLine="true"

like image 33
mDiaz93 Avatar answered Oct 23 '22 16:10

mDiaz93