alibaba / vlayout

Project vlayout is a powerfull LayoutManager extension for RecyclerView, it provides a group of layouts for RecyclerView. Make it able to handle a complicate situation when grid, list and other layouts in the same recyclerview.
http://tangram.pingguohe.net/
MIT License
10.8k stars 1.79k forks source link

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

Open shiner0 opened 3 years ago

shiner0 commented 3 years ago

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

longerian commented 3 years ago

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

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 .

shiner0 commented 3 years ago

要检查下是不是类型转换问题,不复用缓存池问题也不大。 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(); }