开发者

Android singleline texthint

The setHint and singleLine settings don't seem to be able to work together. If my hint is longer than a single line and I have singleLine set to true, the editText box automatically spans to 2 lines regardless.

Does anyone have 开发者_如何学Pythona workaround?


I tried to do:

textView.setHint("Veeeeeery looooooong hiiiiiiint");
textView.setEllipsize(TruncateAt.END);
textView.setSingleLine();

and it seems to work. The hint is truncated with ellipsize at the end.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜