I have a TextView
that I want to limit characters of it. Actually, I can do this but the thing that I\'m looking for is how to add three dots (...) at the end o
You can limit your textview's number of characters and add (...) after the text. Suppose You need to show 5 letters only and thereafter you need to show (...), Just do the following :
String YourString = "abcdefghijk";
if(YourString.length()>5){
YourString = YourString.substring(0,4)+"...";
your_text_view.setText(YourString);
}else{
your_text_view.setText(YourString); //Dont do any change
}
a little hack ^_^. Though its not a good solution. But a work around which worked for me :D
EDIT: I have added check for less character as per your limited no. of characters.