title: How to change title in AppCompatActivity
body: <p>I try to change the title of my MainActivity outside the <code>onCreate()</code> method. It seems to work inside <code>onCreate()</code>, but if I try to change it programmatically, it doesn't do anything. </p>
  
  <p>My onCreate:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setDisplayShowTitleEnabled(true);
      getSupportActionBar().setTitle(selectedSong);
  </code></pre>
  
  <p>I already tried outside the <code>onCreate()</code>: </p>
  
  <pre><code> public void updatetitle(String title) {
          toolbar.setTitle(title);
          getSupportActionBar().setTitle(selectedSong);
          ((MainActivity) this).getSupportActionBar().setTitle(selectedSong);
          setTitle(selectedSong); 
  }
  </code></pre>
  
  <p>None of these works. When I debug the code. The code in the toolbar object is updated, but the view isn't refreshed. Any hints? Thanks. </p>