title: OnCreateView called multiple times / Working with ActionBar and Fragments
body: <p>I switched part of my App from Activities to Fragments so that I can use the neat ActionBar tabs.</p>
  
  <p>However, after completing the transition I ran into an issue: whenever I switch to another tab, that Fragment gets created all over again. Both onCreate and onCreateView get called every time I get to a tab.</p>
  
  <p>I have 4 tabs, each of which is meant to open one of these fragments:</p>
  
  <pre><code>Fragment ShopFragment = new WebActivity();
  Fragment SearchFragment = new SearchActivity(context);
  Fragment StoreFragment = new StoreLocatorActivity(context, this);
  Fragment BlogsFragment = new BlogsActivity(context, this);
  </code></pre>
  
  <p>Here's my code for the listener:</p>
  
  <pre><code>    class MyTabsListener implements ActionBar.TabListener {
          public Fragment fragment;
  
          public MyTabsListener(Fragment fragment) {
              this.fragment = fragment;
          }
  
          @Override
          public void onTabReselected(Tab tab, FragmentTransaction ft) {
              ft.hide(fragment);
          }
  
          @Override
          public void onTabSelected(Tab tab, FragmentTransaction ft) {
              ft.replace(R.id.fragment_container, fragment);
          }
  
          @Override
          public void onTabUnselected(Tab tab, FragmentTransaction ft) {          
  
          }
  
      }
  </code></pre>
  
  <p>Could someone please point me in the right direction?</p>