UMAR-MOBITSOLUTIONS
UMAR-MOBITSOLUTIONS

Reputation: 78004

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 should 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.

Upvotes: 2

Views: 1098

Answers (2)

Olimjon Rustamov
Olimjon Rustamov

Reputation: 1

You can use singleLine property of TextView:

android:singleLine="true"

Upvotes: 0

Pentium10
Pentium10

Reputation: 208042

Use the following for your TextViews:

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

Upvotes: 7

Related Questions