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

特殊文本的bug #6

Open
zane-liucz opened this issue Mar 11, 2019 · 3 comments
Open

特殊文本的bug #6

zane-liucz opened this issue Mar 11, 2019 · 3 comments

Comments

@zane-liucz
Copy link

如果文字满足折叠调价,文字中有特殊字符\n \t,这几个特殊字符刚好在最大行数附近的位置,有可能会崩溃,translateText的while循环中出现角标越界异常.一旦出现则是必现.
对于一些文本还会有展开"全文"字符本应在行尾,但实际上却换行的问题

@tmx0456
Copy link

tmx0456 commented Sep 9, 2019

我也出现这个问题了,你是咋解决的

@zane-liucz
Copy link
Author

SpannableFoldTextView类中translateText方法的while循环的问题,循环条件中多加两条判断,改为
while (end <= layout.getLineVisibleEnd(mShowMaxLine - 1) &&
end <= mOriginalText.length() && layout.getPrimaryHorizontal(end - 1) + getTextWidth(mOriginalText.subSequence(end - 1, end).toString()) < x)

@baiguanyun
Copy link

me too

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

3 participants