title: android fragments getArguments() return null
body: <p>getArguments() return null!</p>
  
  <p>code in activity:</p>
  
  <pre><code>if (savedInstanceState == null) {
              // During initial setup, plug in the details fragment.
              FlightListFragment listFragment = 
                       FlightListFragment.newInstance(mSearchParams);
              getSupportFragmentManager().beginTransaction().add(
                      android.R.id.content, listFragment).commit();
   }  
  </code></pre>
  
  <p>in fragment:</p>
  
  <pre><code>@Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle 
                      savedInstanceState) {
          mSearchParams = 
                 getArguments().getParcelable(SearchResultsActivity.EXTRA_SEARCH_PARAMS);
          return super.onCreateView(inflater, container, savedInstanceState);
      }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>public static FlightListFragment newInstance(SearchParams sp) {
      FlightListFragment f = new FlightListFragment();
      Bundle b = new Bundle();
      b.putParcelable(SearchResultsActivity.EXTRA_SEARCH_PARAMS, sp);
      f.setArguments(b);
      return f;
  }
  </code></pre>
  
  <p>But I always get NullPointerException here: getArguments().<br>
  Please, explain me what I am doing wrong.<br>
  Thanks!</p>
  
  <p>EDITED:<br>
  I've found that newInstance() method is called after onCreateView, so I moved code from it to onCreate, but the issue didn't avoid.</p>