Problem: Fragment onResume() in ViewPager is fired before the fragment becomes actually visible.
onResume()
ViewPager
For example, I have 2 fragments with
I used this and it worked !
mContext.getWindow().getDecorView().isShown() //boolean