Android: Line-limited textview with "..." to show that there is more content -


i displaying long (random) text in textview. want show 3 lines in textview , show dots (...) if there more content. know can limit lines of textview minlines , maxlines, don't know add dots in string.

e.g. textview could/should like

"this random text  short 1  , more here..."  "this 1 has  loooooooooooooooong  string ..." 

you don't need know add dots, textview can you. checkout android:ellipsize=end. note ellipsize's algorithm doesn't work reliably in older android versions. there might discrepancies between exact behavior between 2.3, 3 , 4+. example know not show more 2 lines in 2.3


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -