android-autofittextview
android-autofittextview copied to clipboard
Bug: text get truncated even though there is a lot of space left, and characters can go to next line
On some cases, the letter of one word goes to the next line.
Here's a sample case:
<me.grantland.widget.AutofitTextView
android:id="@+id/output_autofit"
android:layout_width="286dp"
android:layout_height="305dp"
android:maxLines="3"
android:text="content text sample" />
mAutofitOutput = (AutofitTextView) findViewById(R.id.output_autofit);
mAutofitOutput.setMaxTextSize(1000);
BTW, there is no "maxTextSize" attribute, so I had to do it via code instead.
The result (modified the sample) :
Not only that, but for the same case, when increasing the width of the textView, the text itself gets truncated. Here's what happens when I set the width to match_parent :