title: Get current fragment using fragmentpageradapter
body: <p>EDIT: PROBLEM SOLVED. SEE COMMENTS BELOW...</p>
  
  <p>I'm trying to implement an OnPageChangeListener to my ViewPager. I have issues determining the active fragment (name the class myFragment). Somewhere in my TabsAdapter the Fragment is set: </p>
  
  <pre><code>@Override
  public Fragment getItem(int position) 
  {
        TabInfo info = mTabs.get(position);
        return Fragment.instantiate(mContext, info.clss.getName(), info.args);
  }
  </code></pre>
  
  <p>I think, that info.clss.getName() is like myFragment.class.getName().
  If i call this:</p>
  
  <pre><code>FragmentManager fm = getSupportFragmentManager();
  </code></pre>
  
  <p>then myfragment.class.getName() appears in properties. But if i call this:</p>
  
  <pre><code>Fragment test = fm.findFragmentByTag(myfragment.class.getName());
  </code></pre>
  
  <p>test is null.</p>
  
  <p>See what FM is at runtime:</p>
  
  <pre><code>fm  FragmentManagerImpl  (id=830007952696)  
      mActive ArrayList  (id=830007771376)    
          array   Object[12]  (id=830008021856)   
              [0] fragment1  (id=830007965416)    
              [1] myFragment (id=830008076232)    
              [2] null    
              ...
          size    2   
      mActivity   tabActivity  (id=830007948592)  
      mAdded  ArrayList  (id=830007781264)    
      mAvailBackStackIndices  null    
      mAvailIndices   null    
      mBackStack  null    
      mBackStackChangeListeners   null    
      mBackStackIndices   null    
      mCreatedMenus   null    
      mCurState   5   
      mDestroyed  false   
      mExecCommit FragmentManagerImpl$1  (id=830007953504)    
      mExecutingActions   false   
      mHavePendingDeferredStart   false   
      mNeedMenuInvalidate false   
      mNoTransactionsBecause  null    
      mPendingActions ArrayList  (id=830007908880)    
      mStateArray null    
      mStateBundle    null    
      mStateSaved false   
      mTmpActions Runnable[1]  (id=830007783384)
  </code></pre>
  
  <p>Another issue is, that the tab indicator isn't set to the active tab.</p>