EDIT:
As pointed out in the comments, setUserVisbileHint()
does not get called automatically, but by the FragmentPageAdapter when used in a ViewPager.
For the scenario described in the question, onHiddenChanged(boolean hidden)
http://developer.android.com/reference/android/app/Fragment.html#onHiddenChanged(boolean) is suitable.
As stated in the documentation, the method gets called every time the Fragments hidden state changes, but not on the initial setup of the Fragment.
You could use setUserVisibleHint()
http://developer.android.com/reference/android/support/v4/app/Fragment.html#setUserVisibleHint(boolean)
if isVisibleToUser
is set to true
the fragment should be displayed.