vlayout icon indicating copy to clipboard operation
vlayout copied to clipboard

请问recycleview作为item 横向滑动的时候需要设置复用池吗?

Open shiner0 opened this issue 4 years ago • 2 comments

item是一个recycleview 把最外层的复用池 传给作为item的recycleview 多滑动几次布局 会出现卡顿。我把作为item的recycleview 不设置复用池 就不会出现卡顿。如果里面的item需要设置复用池 如何和外层公用一个。谢谢!!! @ @longerian

shiner0 avatar Mar 09 '21 01:03 shiner0

要检查下是不是类型转换问题,不复用缓存池问题也不大。

tangrui @.***>于2021年3月9日 周二09:42写道:

item是一个recycleview 把最外层的复用池 传给作为item的recycleview 多滑动几次布局 会出现卡顿。我把作为item的recycleview 不设置复用池 就不会出现卡顿。如果里面的item需要设置复用池 如何和外层公用一个。谢谢!!! @ @longerian https://github.com/longerian

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alibaba/vlayout/issues/522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALRAQM6VCPHOVNG533QTETTCV4JBANCNFSM4Y2QKHOA .

longerian avatar Mar 11 '21 08:03 longerian

要检查下是不是类型转换问题,不复用缓存池问题也不大。 tangrui @.***>于2021年3月9日 周二09:42写道: item是一个recycleview 把最外层的复用池 传给作为item的recycleview 多滑动几次布局 会出现卡顿。我把作为item的recycleview 不设置复用池 就不会出现卡顿。如果里面的item需要设置复用池 如何和外层公用一个。谢谢!!! @ @longerian https://github.com/longerian — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#522>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALRAQM6VCPHOVNG533QTETTCV4JBANCNFSM4Y2QKHOA .

W/VirtualLayoutManager: java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling androidx.recyclerview.widget.RecyclerView 滑动得时候抛异常了 在onBindViewHolder 里面调用了刷新

@Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { adapter.notifyDataSetChanged(); }

shiner0 avatar Mar 11 '21 08:03 shiner0