Viewpager2 with fragment and diffutil problem

987 views Asked by At

I have a problem with viewpager2.

Problem is

  • There is a viewpager2 with Fragment, FragmentStateAdapter, DiffUtil
  • If page is selected, update fragment list dynamically. (remove, add)
  • Here is a example.
  • A, B(current), C -> swipe to C -> A, B, C(current)
  • Then update list with diffUtils (oldList:A, B, C(current) / newList: C, B)
  • Viewpager is updated with C(current), B successfully, but B is shown(like sliding animation left to right) because its index is changed. (before: left of C / after: right of C)

Have you ever seen this problem on the Android issue tracker?

I cannot find a solution, please help.

enter image description here

enter image description here

enter image description here

0

There are 0 answers