各位板友好
想请问如果 text 字数过多, TextView 显示不下
多余的字想在后面显示 ... 效果
例如:
这是一个范例, 想了解更多...
这样 TextView 要怎么设定呢?
我发现 TextView 设定 android:singleLine="true" 的话, 自动会有 ... 的效果
但如果不是 singleLine 呢?
我现在是
<TextView
android:id="@+id/txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lines="2">
lines = "2" 好像就不work 了
有人知道怎么解? ellipsize 好像也不work
先谢谢各位
作者: passli 2014-07-15 23:43:00
因为你 layout_width="match_parent" 设定成这样子所以他parent有多宽就有多宽,改成warp_content 看看