Reputation: 225
I'm expriencing problems with TextViews...
Its seems like depending on the size of the next word before it breaks to new line, on its own, the string has no '\n' in it, t leaves useless blank space that I don't want.
This is the problmetic Textview:
and other times it goes like I want it to:
What is causing this? help :)
Upvotes: 0
Views: 292
Reputation: 106
It seems like this is a text justification problem. In Android O, Android introduced the android:justificationMode
attribute.
If you are targeting Android O+, adding android:justificationMode="inter_word"
should justify the text so that this doesn't occur. If you are targeting older versions of Android, you might be able to use some libraries (here) to achieve this behavior.
Upvotes: 2