AutoFitTextView icon indicating copy to clipboard operation
AutoFitTextView copied to clipboard

Dosen't work with Chinese multiline sentence

Open imlk0 opened this issue 5 years ago • 1 comments

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(;′⌒`)

imlk0 avatar Aug 20 '18 05:08 imlk0

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

AndroidDeveloperLB avatar Aug 20 '18 06:08 AndroidDeveloperLB