How does fragment's lifecycle works inside viewpager? Why onStop is not called on navigation change?
问题 I'm using ViewPager 2 from AndroidX with 4 instances of the same fragment. My question is pretty straight forward. When I'm navigating to some another fragment(using navigation drawer or even something else). OnStop() , OnDestroy(), OnDettach() of the fragments inside the viewpager does not gets triggered. So why is that? And If I want to remove the listeners I've started already, in one of these methods, how can I do that? For example, I'm using GreenRobot's EventBus. And I'm registering the