Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

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

Open
shiner0 opened this issue Mar 9, 2021 · 2 comments

Comments

@shiner0
Copy link

shiner0 commented Mar 9, 2021

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

@longerian
Copy link
Contributor

longerian commented Mar 11, 2021 via email

@shiner0
Copy link
Author

shiner0 commented Mar 11, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants