title: Event when A Page in ViewPager goes in Background
body: <p>I have a view Pager and I want to start an activity when a user leaves the screen with a particular Page open on ViewPager.(either slides to other Page or click any of the Tab host items).I loading a fragment in each Page.</p>
  
  <pre><code>int previous=-1;
    mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() 
      {
          @Override
          public void onPageSelected(int position)    
          {
              //Show upgrade pop up if day is greater than free days
              if(previous==selected_week)
              {
                 //start activity
              }
              previous=position;
          }
     }
  </code></pre>
  
  <p>But for clicking any other buttons(Tab host ,etc).I am not able get the event.
  I tried <code>onPause()</code>,<code>onStop()</code> and <code>onDestroyView()</code> of the fragement(Page) and also the Container.But these events are called when i return to same Tab in Tab host.How can I catch the event for this?.Thanks </p>