title: onCreate(Bundle savedInstanceState) in always null
body: <p>I know, this question is asked before on stackoverflow, but non of the answers worked for me. </p>
  
  <p>Probably worth mentioning: </p>
  
  <ul>
  <li>I use ActionBarSherlock with the support package. </li>
  <li>Method <code>onSaveInstanceState</code> IS called when I press the home button. The method <code>onCreate</code> just always gives NULL for the <code>Bundle savedInstanceState</code>.</li>
  <li>Method <code>onRestoreInstanceState</code> is never called at all. (I wouldn't mind if the <code>onCreate</code> worked ;)).</li>
  <li>Also (it shouldn't matter) I tried putting <code>super.onSaveInstanceState(outState)</code> at the bottom of <code>onSaveInstanceState</code>. No luck either.</li>
  </ul>
  
  <p>Here's the code. I hope someone had this problem and solved it.</p>
  
  <pre><code>public class MainActivity extends SherlockFragmentActivity {
  
      private static final String LOG_TAG = MainActivity.class.getSimpleName();
  
      private static String STATE_TO_STORE = "state_to_store";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);        
  
          Log.d(LOG_TAG, "onCreate: savedInstanceState = " + (savedInstanceState == null ? "NULL" : "Not NULL"));
  
          // ... more code...
      }
  
      @Override
      public void onRestoreInstanceState(Bundle savedInstanceState) {
          super.onRestoreInstanceState(savedInstanceState);
  
          Log.d(LOG_TAG, "onRestoreInstanceState: savedInstanceState = " + (savedInstanceState == null ? "NULL" : "Not NULL"));
      }
  
      @Override
      public void onSaveInstanceState(Bundle outState) {
          super.onSaveInstanceState(outState);
  
          outState.putInt(STATE_TO_STORE, 5); // store some int
  
          Log.d(LOG_TAG, "onSaveInstanceState bundle: " + outState.toString());
      }
  
      // ... more code ...
  
  }
  </code></pre>
  
  <p>The logging clearly states <code>onSaveInstanceState</code> is being called and onCreate gets <code>savedInstanceState = NULL</code>. </p>