We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
notifyItemRemoved(listData,pos) 这个API: 不合理不友好的原因: 实际内部只使用了listData.size() 作为 notifyItemRangeChanged的范围,但是,没有考虑到有些使用RecyclerView的场景,他的数据源并不是标准的List 这种:例如,界面上面是一片文章,下面是对文章的一条一条评论,这种场景下,评论是在文章这个对象下面的某一个列表里面,列表的长度是由文章和评论 加起来共同决定的。
建议的修改方式: 建议不让外面传入这个listData对象,而是内部直接通过原来的Adapter的getItemCount()来获取这个值;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
notifyItemRemoved(listData,pos) 这个API:
不合理不友好的原因:
实际内部只使用了listData.size() 作为 notifyItemRangeChanged的范围,但是,没有考虑到有些使用RecyclerView的场景,他的数据源并不是标准的List 这种:例如,界面上面是一片文章,下面是对文章的一条一条评论,这种场景下,评论是在文章这个对象下面的某一个列表里面,列表的长度是由文章和评论 加起来共同决定的。
建议的修改方式:
建议不让外面传入这个listData对象,而是内部直接通过原来的Adapter的getItemCount()来获取这个值;
The text was updated successfully, but these errors were encountered: