Can you use ellipsize with maxLength in xml?

503 Views Asked by At

So I’m trying to have an ellipsize at the end of a TextView if the text length exceeds 30 characters. I tried to achieve this in xml using maxLength, maxEms, ellipsize = end, maxLines ... But it doesn’t seem to work. Can this be achieved in xml or it has to be hardcoded ? If so, how can this be done ?

1

There are 1 best solutions below

1
On

Posting this as an answer because I can't yet add this as comment. I think this may answer your question. https://stackoverflow.com/a/53349554/13520662