android-autofittextview icon indicating copy to clipboard operation
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

Open AndroidDeveloperLB opened this issue 8 years ago • 0 comments

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) : device-2016-02-09-111057

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 :

device-2016-02-09-111611

AndroidDeveloperLB avatar Feb 09 '16 09:02 AndroidDeveloperLB