如何使的EditText暗示不换? [英] How to make EditText hint not to wrap?

查看:81
本文介绍了如何使的EditText暗示不换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一条线的EditText,当我设置一个长的提示,提示换到两行。我可以强制的EditText是总有一个行高? 机器人:行=1没有工作

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.

推荐答案

你试过安卓ellipsize 吗?这可以被设置为截断结束在该行......无论是在开始,中间,结尾,或者你可以将其设置为选取框(滚动跨越)。不知道副手这是否适用于暗示或没有,但它应该。

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.

这篇关于如何使的EditText暗示不换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆