Reputation: 904
I never really understood why I should remove the listeners of a ViewPager when the containing fragment is destroyed but I did it anyway (because I was told to). I used clearOnPageChangeListeners().
I want to upgrade to ViewPager2 and there isn't an equivalent.
Does it mean that I don't have to remove the listeners anymore?
Was clearOnPageChangeListeners() on at onDestroyView() nonsense the whole time?
I'm certainly not going to save listeners in redundant variables just to be able to remove them later...
Upvotes: 0
Views: 16