AutoFitTextView
AutoFitTextView copied to clipboard
Dosen't work with Chinese multiline sentence
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(;′⌒`)
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