Skip to content

AutoResizeTextView doesn't wrap content when has new line character in the string ('\n')Β #37

@overcomer

Description

@overcomer

I use AutoResizeTextView and set the string in strings.xml such as "This is a string\nwith new line character". The string will displayed as a very small text.

I think the issue is in isValidWordWrap method, it doesn't include (before == '\n') as a valid word wrap. I have tested by adding (before == '\n') in isValidWordWrap method as following:

public boolean isValidWordWrap(char before, char after) {
      return before == ' ' || before == '-' || before == '\n';
}

And it will work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions