开发者

how to add Continue String Sign like "..." in TextView?

if i add string in a TextView for example,

this is my string

and TextView max length is 4

It shoul开发者_Python百科d look like in activity this... or t... that means string continue sign at the end of assigned string if string size is bigger than Max length.

Can any one guide me what should i do or i will have to manually add "..." at the end of string through programming.

Any help would be appreciated.


Use the following for your TextViews:

android:ellipsize="end" 
android:singleLine="true"


You can use singleLine property of TextView:

android:singleLine="true"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜