Skip to content

Dosen't work with Chinese multiline sentence #47

Description

@imlk0

I have found a bug, when it is all Chinese sentence and more then one line, the textsize would be divided to min size.
It is because:
https://github.com/AndroidDeveloperLB/AutoFitTextView/blob/master/AutoFitTextViewLibrary/src/com/lb/auto_fit_textview/AutoResizeTextView.java#L89

in Chinese sentence, words was not linked by or -
so the method isValidWordWrap return false everytime in Chinese sentence, and then the sizebecome smaller and smaller(;′⌒`)

Activity

  1. AndroidDeveloperLB commented on Aug 20, 2018

    @AndroidDeveloperLB
    Owner

    If you know how to fix it for all languages, please do.
    I think that what Google has today is quite good. Maybe you should try it out instead of what I've made so long ago :

    https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview

    I suggest using it together with "balanced" for "breakStrategy" :

    https://developer.android.com/reference/android/widget/TextView.html#attr_android:breakStrategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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