title: Fragments onCreateView() bundle. Where does it come from?
body: <p>I'm starting an Activity through the usual means:</p>
  
  <pre><code>Intent startIntent = new Intent(this, DualPaneActivity.class);
  startIntent.putExtras(((SearchPageFragment) currentFragment).getPageState());
  startActivity(startIntent);
  </code></pre>
  
  <p>When this activity loads, it places a Fragment in a frame like so:</p>
  
  <pre><code>FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();   
  Fragment currentFragment = fragment;
  currentFragment.setArguments(getIntent().getExtras());
  transaction.replace(R.id.singlePane, currentFragment);  
  transaction.commit();
  </code></pre>
  
  <p>Seems simple, right?</p>
  
  <p>However, you can inside of onCreateView() method access three separate bundles (four, if you include the one included in the Fragment's <code>onCreate(Bundle savedInstanceState)</code>):</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
  {
      // Fill state information
      Bundle bundle;
      if(savedInstanceState != null)  bundle = savedInstanceState; // 1       
      else if(getArguments() != null) bundle = getArguments();     // 2
      else                            bundle = getActivity().getIntent().getExtras(); // 3
      setPageState(bundle);   
  }
  </code></pre>
  
  <p>In the above instance, I've worked out from trial and error that the bundle I want is the second one, the one retrieved from <code>getArguments()</code>.</p>
  
  <p>From my understanding the third one from <code>getActivity().getIntent().getExtras();</code> is actually calling the Bundle from the intent used to start containing activity. I also know from experimentation that <code>savedInstanceState</code> seems to always be null. But where is it coming from and <strong>why</strong> is it null?</p>
  
  <p>The <a href="http://developer.android.com/reference/android/app/Fragment.html" rel="nofollow noreferrer">documentation</a> says this:</p>
  
  <blockquote>
    <p>savedInstanceState    If non-null, this fragment is being re-constructed
    from a previous saved state as given here.</p>
  </blockquote>
  
  <p>That doesn't help me - It's bugging me more than stopping me from moving on. Can someone help me out with this annoyance?</p>