title: FragmentTabHost & Fragments - How do I pass data between tabs?
body: <p>I have a MainActivity (FragmentActivity) that has a FragmentTabHost.</p>
  
  <pre><code>public class FragmentTabs extends FragmentActivity {
      private FragmentTabHost mTabHost;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.fragment_tabs);
          mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost);
          mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
  
          mTabHost.addTab(mTabHost.newTabSpec("classA").setIndicator("Class A"),
              ClassA.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("classB").setIndicator("Class B"),
              ClassB.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("classC").setIndicator("Class C"),
              ClassC.class, null);
      }
  }
  </code></pre>
  
  <p>ClassA, ClassB and ClassC are all <strong>Fragments</strong> (android.support.v4.app.Fragment).</p>
  
  <p>I need to pass data (and call methods) on the Fragments. How can I get a reference of each of the Fragments, like this:</p>
  
  <pre><code>ClassA mClassAFragment = ???;
  </code></pre>
  
  <p>I've tried using getSupportFragmentManager().findFragmentByTag() and I've also tried exploring the capabilities of mTabHost. Nothing can get them.</p>
  
  <p>Can you suggest a way to do this or suggest an alternative approach?</p>