Closed diguagege closed 5 years ago
在onMeasure的时候 if (maxWidth <= lineWidth + view.getMeasuredWidth()) { contentHeight += mLineMargin; contentHeight += maxItemHeight; maxItemHeight = 0; maxLineWidth = Math.max(maxLineWidth, lineWidth); lineWidth = 0; begin = true; }
这个判断,没有加上下个view所需的wordMargin,导致无法正确计算该行是不是可以正确显示下一条数据。
更正后应该是: if (maxWidth <= lineWidth + view.getMeasuredWidth() + mWordMargin) { contentHeight += mLineMargin; contentHeight += maxItemHeight; maxItemHeight = 0; maxLineWidth = Math.max(maxLineWidth, lineWidth); lineWidth = 0; begin = true; }
你好,你使用的是那个版本的。在1.4.1的版本,这个bug已经修复了。谢谢!
在onMeasure的时候 if (maxWidth <= lineWidth + view.getMeasuredWidth()) { contentHeight += mLineMargin; contentHeight += maxItemHeight; maxItemHeight = 0; maxLineWidth = Math.max(maxLineWidth, lineWidth); lineWidth = 0; begin = true; }
这个判断,没有加上下个view所需的wordMargin,导致无法正确计算该行是不是可以正确显示下一条数据。
更正后应该是: if (maxWidth <= lineWidth + view.getMeasuredWidth() + mWordMargin) { contentHeight += mLineMargin; contentHeight += maxItemHeight; maxItemHeight = 0; maxLineWidth = Math.max(maxLineWidth, lineWidth); lineWidth = 0; begin = true; }