title: findFragmentByTag - looking for fragment in FragmentTabHost - always null
body: <p>I'm having trouble getting a pointer to a Fragment which is the currently visible fragment in a FragmentTabhost.</p>
  
  <p>I have a <code>SherlockFragmentActivity</code> called <code>SecondActivity</code> that loads the Tabhost from it's <code>onCreate</code> method like this:</p>
  
  <pre><code>if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
      Fragment f = new TabsFragment();
  
      getSupportFragmentManager().beginTransaction().add(android.R.id.content, f, "tabsfragment").commit();
  }
  </code></pre>
  
  <p><code>TabsFragment</code> is a <code>SherlockFragment</code> subclass with this <code>onCreate</code> method to create the tabs</p>
  
  <pre><code>@Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          mTabHost = new FragmentTabHost(getActivity());
          mTabHost.setup(getActivity(), getChildFragmentManager(), R.layout.tabs);
  
          mTabHost.addTab(mTabHost.newTabSpec("Tab1").setIndicator("Offers",
                  getResources().getDrawable(R.drawable.offersale)),
                  OfferListFragment.class,
                  null);
  
          mTabHost.addTab(mTabHost.newTabSpec("Tab2").setIndicator("News",
                  getResources().getDrawable(R.drawable.newspaper)),
                  NewsFragment.class,
                  null);
  
          return mTabHost;
  
      }
  </code></pre>
  
  <p>Now when i'm in the 2nd tab, I have a background task done in a class that is initiated by the original activity <code>SecondActivity</code>, then I call this which is supposed to give me a reference to the tab, but it always returns null!</p>
  
  <p><code>NewsFragment newsView = (NewsFragment) delegate.getSupportFragmentManager().findFragmentByTag("Tab2");</code></p>
  
  <p>The <code>delegate</code> variable is a pointer back to <code>SecondActivity</code> when it starts the background class.</p>
  
  <p>How do I get a pointer to the tab's fragment?
  Am I wrong that "Tab2" set when adding the tabs is the <code>Tag</code> for the fragment?</p>