android - TextView setText problem -


I have TextView and I need to add 10 characters in that textview by code. But when the characters are more than 10, they should be displayed in textview, but with that code's 8 characters + .. . And when I want to read the lesson of that textview, I should not get it completely 8 character + .. . For example

tv.settext ("ASDFGHJKLQ") // This is 10 characters long, so no rule is necessary

but

Tv.settext ("ASDFHJKLOP") // If it exceeds more than 10 characters, then it should be displayed in the form of text as ASDFGHJK .. , but when I read textviewview , Then it can be done by ASDFGHJK .. rather than , then how can it be done.

This text is the line of a list view.

Try adding it to your text view (marquee or end):

  android: ellipsize = "marquee" / code>  

You may also need it:

  android: scrollHorizontally = "true"   

Unless scrolledjantly = "true" you can still engage with script-wrapped text ... I'll use these very 2 lines to display a list view in my app 3 long Lines have been properly added to me

Comments