-
Notifications
You must be signed in to change notification settings - Fork 334
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
使用分组功能出现崩溃 #79
Comments
|
我在sample无法复现 |
我下午改一下sample代码 看看能复现错误不能 |
已解决,原因是分组里面的item对应的实体类未继承ItemExpand(看文档以为只有外部的组实体类需要继承ItemExpand),导致点击收缩时移除元素时把其他分组属性相同的item也一并移除了,导致下标计算错误。 |
(this@BindingAdapter.models as MutableList).removeAll(sublistFlat) 理论上不要求子列表一定实现 |
我的使用场景是一个通讯录,顶部是一个常用联系人分组,与下方的地区分组中存在相同的联系人。 |
东哥,使用sample代码可以复现. |
这属于Java自带函数 val element = Element()
val list = mutableListOf(element, Element())
println("size = ${list.size}") // output 2
list.removeAll(listOf(element))
println("size = ${list.size}") // output 0 数据类 data class Data(var name: String = "data") 解决方法两个
|
这个问题等我确定下是BRV内部修改还是文档提示 |
是的,我也想明白了 |
当使用分组时,某一分组的Item超出一屏后点击分组标题收缩分组时会导致崩溃。
错误信息:
The text was updated successfully, but these errors were encountered: