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.
精彩评论