Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dosen't work with Chinese multiline sentence #47

Open
imlk0 opened this issue Aug 20, 2018 · 1 comment
Open

Dosen't work with Chinese multiline sentence #47

imlk0 opened this issue Aug 20, 2018 · 1 comment

Comments

@imlk0
Copy link

imlk0 commented Aug 20, 2018

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

@AndroidDeveloperLB
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants