Suppose there are two Fragments, X, and Y. I am adding Y fragment over X. When Y completes its work then removed and again X is visible.
Problem: I have to do some task when Y fragment is removed and X is visible again, but onResume
is not called because it depends on Activity. Then how should I know that X
Fragment is visible?