title: How can I reuse an Android fragment instance across different fragments?
body: <p>Here is my use case:</p>
  
  <p>I need to create 3 tabs using <a href="http://developer.android.com/guide/topics/ui/actionbar.html#Tabs" rel="noreferrer">ActionBar Navigation Tabs</a>, and I am using <a href="http://actionbarsherlock.com/" rel="noreferrer">ActionBarSherlock</a> to accomplish this.  Each of the 3 tabs is it's own <a href="http://developer.android.com/guide/topics/fundamentals/fragments.html" rel="noreferrer">Fragment</a>. However, there is some common information that is shown in each of the tabs (in my case, product title, description).  I have created another Fragment for this common information, and am referencing this Fragment in each of the main Fragment layouts, like <a href="http://developer.android.com/guide/topics/fundamentals/fragments.html#Adding" rel="noreferrer">this</a>.</p>
  
  <p>Here is my problem:</p>
  
  <p>I want to reuse the Fragment instance that retrieves and displays the common info. I am using the code below, but it always seems to create a new instance of the common fragment in each of the main fragments.</p>
  
  <pre><code>    FragmentManager fm = getFragmentManager();
      f = (ProductDetailsInfoFragment) fm.findFragmentByTag("prodinfo");
  
      if (f == null) {
          Log.d(TAG, "fragment not found...creating new instance");
  
          f = new ProductDetailsInfoFragment();
          f.setTargetFragment(this, 0);
          fm.beginTransaction().replace(R.id.prod_info_fragment, f, "prodinfo").commit();         
      }
  </code></pre>