Dangling quote character in TextView
When I display quoted text in a textview, occasionally the wrapping will happen such that the final quote character ("
) is wrapped but nothing else is. So I wind up with a dangling quote as the last line, which doesn't look right.
Is there some property to set to keep the text together in these instances? My only thought would be that the period at the end of a quote would get marked as whitespace or the end of a word and so the ui feels free to wrap what comes af开发者_StackOverflowter.
I was having a problem with dangling colon's in my TextViews, and this bit of code stopped them from wrapping:
tv.setEllipsize(null);
tv.setHorizontallyScrolling(true);
and my unverified stab at the equivalent xml:
android:ellipsize=0
android:singleLine="true"
Change the text font a half-size smaller or something similar to that. This could be an easy fix if not the best solution.
精彩评论