使用BRVAH遇:ViewHolder views must not be attached when created. Ensure that you are not passing 'true'

The more common solution on the Internet is that false is not specified in onCreateViewHolder(),

Or, ViewPager, ViewPager2 enable preloading

 

But I encountered it when using BRVAH's setEmptyView(), because the error message does not have a specific line number.

At first I thought it was the above two problems.

After looking for a long time, I finally found that it was the problem of BRVAH's own code not being robust.

For specific solutions, refer to issue #2796,

https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/2796

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326033867&siteId=291194637