Bug P3
Status Update
Comments
jg...@google.com <jg...@google.com> #2
Can you attach / share a project that reproduces the issue?
pa...@bytedance.com <pa...@bytedance.com> #3
Now i sure this is viewpager2's bug.
because just occur recyclerview inside viewpager2 with constraintlayout, if paging3 use Independently with viewpage2 it's not problem.
because just occur recyclerview inside viewpager2 with constraintlayout, if paging3 use Independently with viewpage2 it's not problem.
Description
Version used: 1.0.0
Android versions reproduced on: Android 9.0
Problem Statement:
After migrating ViewPager to ViewPager2 (so as the ViewHolder and Adapter), I'm facing some sliding lag problem.
I've found out that onCreateViewHolder() and onBindViewHolder() runs after the sliding motion when using ViewPager while it goes before when using ViewPager2. This may cause sliding lag problems since all these 2 functions run in the UI thread.
My ViewHolder is complex and it can't be simplified that well due to some business reason.Is it possible to delay these 2 functions in ViewPager2? Or is there any other way to solve my problem?
Appreciated!