I have an Android TextView where the view itself is limited to four lines. If the text exceeds this limit I want the end of the view to end with something like .. <-- to notify that there is more text here so you can click and open in fullscreen for example. Not just suddenly stop in the middle of a sentence. Is there a quick fix for this?
Use the android:ellipsize="end"
attribute in your layout XML file. It may still stop in the middle of a sentence, but it will have an ellipsis (...) at the end.
Go to the layout file which contains this textview and place following attribute
android:ellipsize="end"
There are 4 options. start, end, middle or marquee. Since you want dots at the end use "end" value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With