You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
In ViewPagerLayoutManager file, on method onLayoutChildren, you are calling : View scrap = getMeasureView(recycler, state, 0);
So you are creating the view at index 0.
That's fine.
Then at the end of the method, you are calling : layoutItems(recycler);
Ok that's fine too, but in this method you are calling : recycler.getViewForPosition(adapterPosition)
And that's the issue ! You are creating another time the index 0 that you previously created in method just before. By doing this, with only 3 items shown, we are calling onCreateViewHolder of Adapter 1 time more.
To avoid that, you could just do something like this:
I am trying the Scale layout manager, and there is a lot of performance issue.
For a list of 2 items, my onCreateViewHolder is called 6 times instead of 2 !
Items in viewpool are completly ignored too.
Someone have already encountered something like that ?
The text was updated successfully, but these errors were encountered: