May I know how to limit the length of a text in listView
?
Below is the listView
from wechat
and this is my listView
How to limit the length of text so it will display like this is the work description.Ple...
Any help would be greatly appreciated.
If you set the
TextView
to both singleLine and ellipsize to end, then you should have the desired result.For example:
Using filter in code (Programmatically in your java class)
or in your xml file as below
combined with
you can use code in java
Try this:
you can use Code in java :
and xml Code :
You can use XML code: