title: Changing the value of an EditText inside onCreate() has no effect when changing device orientation
body: <p>My understanding is that when you change the device orientation, your app gets destroyed and created again. This means that onCreate() should run every time I rotate the device.</p>
  
  <p>I'm trying to set an EditText every time the app is created, including whenever the screen is rotated. So, I start up the app, and the text field says "Bap". I then change the contents of the field to "Boop", then rotate the screen. I would expect the field to now say "Bap", but it doesn't, it remains whatever it was after I changed it, before the orientation change. Why is this?</p>
  
  <p>My onCreate() looks like this:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState)
  {    
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      EditText editText = (EditText)findViewById(R.id.edit_message);
      editText.setText("Bap", TextView.BufferType.EDITABLE);
  }
  </code></pre>
  
  <p>It's worth noting that if I move the setText() call into onResume(), everything works as I would expect it to, with the text field resetting every time I rotate the device.</p>
  
  <p>NOTE: I realize <a href="https://stackoverflow.com/questions/6745810/wrong-value-in-edittext-when-changing-screen-orientation">a similar question has been asked</a>, but the answer given doesn't really explain why this behaviour is occuring.</p>