title: How to determine if custom view is currently visible in ViewPager
body: <p>I have a <code>ViewPager</code> with a few custom views. I want to be able to determine from inside one of the views if it is currently visible or not.</p>
  
  <p>Overriding <code>onWindowVisibilityChanged</code> or <code>onAttachedToWindow</code> won't work for this purpose since the <code>ViewPager</code> will call on those methods while instantiating the custom view from a neighbor and therefor will be called without the view actually being visible to the user.</p>
  
  <p>How can I determine from inside the custom view if it is visible to the user?</p>