0

I'm migrating to ViewPager2. In my fragments, I have data on these pages that are dynamic and could be changed depending on what has happened on other pages. Currently, I'm updating the data in the onResume() of my fragments. In ViewPager 1, the fragments would be re-created before reaching a page so I wasn't running into the issue of having to use onResume() to update data. I would like to update the data before it reaches the page in order to avoid this "lag" update. I have tried using LifecycleObserver in order to track when ON_RESUME event is called. But it's being called after onResume() is called.

enter image description here

dman224
  • 7
  • 4

0 Answers0