When using ViewPager
with fragments, our onPause
, onResume
methods are not called when moving between tabs. Is there any way we can figure out in the fragment when we're being made visible or being hidden?
Unfortunately I have logic in onResume
, onPause
, like registering with location services, that never get stopped when switching tabs because onPause
never gets called until one exits the whole app.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…