How to make EditText hint not to wrap?

后端 未结 3 1634
渐次进展
渐次进展 2021-02-20 02:50

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 wo

相关标签:
3条回答
  • 2021-02-20 03:20

    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.

    0 讨论(0)
  • 2021-02-20 03:23

    Try android:singleLine="true"

    0 讨论(0)
  • 2021-02-20 03:29

    Use android:maxLines="1" or android:singleLine="true" instead of android:lines="1"

    0 讨论(0)
提交回复
热议问题