FoldText_Java icon indicating copy to clipboard operation
FoldText_Java copied to clipboard

特殊文本的bug

Open heheheheheheheheh opened this issue 5 years ago • 3 comments

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

heheheheheheheheh avatar Mar 11 '19 10:03 heheheheheheheheh

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

tmx0456 avatar Sep 09 '19 03:09 tmx0456

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

heheheheheheheheh avatar Sep 09 '19 03:09 heheheheheheheheh

me too

baiguanyun avatar Nov 10 '19 00:11 baiguanyun