title: Fragment is recreate on back press from other Fragment
body: <p>I am facing a problem in regarding fragment.
  In my scenario,</p>
  
  <p>There are two fragment associated with FragmentActivity.
  In FragmentActivity, there are a container layout (Frame Layout) in which all fragment will replace.</p>
  
  <pre><code>public void replaceFragment(Fragment fragmentClass) {
          String selectedFragment = fragmentClass.getClass().getName();
  
  
              FragmentManager fragmentManager = getSupportFragmentManager();
              FragmentTransaction fragmentTransaction = fragmentManager
                      .beginTransaction();
              fragmentTransaction
                      .replace(R.id.content_frame, fragmentClass);            
              fragmentTransaction.addToBackStack(null);
              fragmentTransaction.commit();           
  
      }
  </code></pre>
  
  <p>First time , I set a List type fragment (Fragment A) in which get the data from web service and papulate over listview. I execute the AsyncTask from onCreateView() method.</p>
  
  <p><em>In MainActivity: onCreate</em></p>
  
  <pre><code>SherlockFragment fragment = new FragmentA();
  replaceFragment(fragment);
  </code></pre>
  
  <p>On list item click of Fragment A, Fragment A will callback the activity method to replace it to details type fragment Fragment B.</p>
  
  <pre><code>@Override
      public void onAttach(Activity activity) {
          // TODO Auto-generated method stub
          super.onAttach(activity);
          callback = (ICallBack) activity;
  
      }
  
  
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          /*View rootView = inflater.inflate(R.layout.fragment_locate, container,
                  false);*/
          View rootView = inflater.inflate(R.layout.fragment_a, container,
                  false);
  
          ListView list = (ListView) rootView
                  .findViewById(R.id.listView);
          adapter = new MyListAdapter();
          list.setAdapter(adapter);
          list
                  .setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
                      @Override
                      public void onItemClick(AdapterView&lt;?&gt; parent,
                              View convertView, int position, long id) {
                                  SherlockFragment fragment = new SalonDetailFragment();
                                  callback.replaceFragment(fragment);
                      }
                  });
  
          ListDataTask task = new  ListDataTask();
          task.execute();
  
          return rootView;
      }
  
      class ListDataTask extends AsynTask&lt;Void,Void,List&lt;Data&gt;&gt;{
  
      public Void doInBackground(Void parems){
  
          List&lt;Data&gt; = getDataFromServer();
      }
      onPostExecute(List&lt;Data&gt; data){
          adapter.addAllData(data);
          adapter.notifyDataSetChanged();
      }
  
      }
  </code></pre>
  
  <p>When I press back button, from Fragment B then Application will show Fragment A but it execute Asynctask again and get the data to papulate the listview.</p>
  
  <p>So I need to know, How to maintain the pervious state of Fragment like Activity.</p>
  
  <p>Is there are any way to not to create Fragment after come back from Other activity</p>
  
  <p>Have a look my <strong>pseudo code.</strong></p>