Skip to content
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

Global RecycledViewPool #111

Open
jamal-wia opened this issue Jan 19, 2023 · 4 comments
Open

Global RecycledViewPool #111

jamal-wia opened this issue Jan 19, 2023 · 4 comments

Comments

@jamal-wia
Copy link

I get ClassCastException in bind when use global RecycledViewPool

@sockeqwe
Copy link
Owner

Hi,
can you share any Stacktrace please?

@TenBort
Copy link

TenBort commented Feb 23, 2023

Hi, proble in pool, when add to pool items from childs adapters,
it draws inside an item that is a recycle & viewType of all children of this recycler view starts from 0, and so for each recycle in the parent recycler view, and the recycler view pool works on viewType and it passes the wrong link to viewHolder, that why he get ClassCastExeption

@TenBort
Copy link

TenBort commented Feb 23, 2023

need to find way to add unic viewtype to any child

@sockeqwe
Copy link
Owner

if you use a Pool, you need to ensure the the viewType ids for each adapter delegate is constantly the same.

You can specify your viewType by calling adapterDelegatesManager.addDelegate(yourViewType, yourDelegate).

This should help

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

No branches or pull requests

3 participants