-
Notifications
You must be signed in to change notification settings - Fork 535
listview嵌套回复内容时,回复数量多的时候会很卡顿 ,如何提高textview渲染性能? 请各位大神赐教 #371
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
Comments
@tanranran 这个回复列表也是通过item嵌套listview实现的,但是还是评论数多的时候滑动起来还是会很卡顿 |
在公司的项目写过一个类似的实现,用的是很取巧的方式。思路可以看https://wiyi.org/avoid-nest-list-view.html。 内容作为group,评论作为child就行了,避免了嵌套的问题,不会造成卡顿。 |
这个是我的朋友圈一步一步实现的项目,目前一直在维护,刚撸完一个初学的服务器,相关文章都在readme中有写到,跳到简书文集看就可以了。 我的评论列表用的是linearlayout+textview扩展实现 比如当前item有5个view,但复用后新下发的评论有8个,那我们就New出3个add进去,然后再设置。 同时欢迎PR -V- |
@xingty 链接失效了 |
@gdgm123 |
@razerdp 我的是自定义viewgroup+textview+子view的复用,,建议不要remove view 而是复用的时候多余设置为GONE,这样避免了remove刷新卡顿,复用优化不是很大,虽然主要卡顿还是在于每个评论的textview的渲染,测量 定位问题 |
@xingty 我找个时间试试你的思路,非常感谢 |
一个ViewGroup,往里面加子View |
No description provided.
The text was updated successfully, but these errors were encountered: