Android can't set toolbar title after screen rotate (tablet layout to portrait)
<p>I got an android app, where I am currently working on the tablet layout.</p>

<p>Everything works fine, besides if you try to switch from tablet layout to normal portrait layout, then the title is not set anymore. Instead the default title is displayed as static and can't be changed with the normal setTitle method anymore. It is called as I see in the debug log, but this isn't reflected in the layout.</p>

<p>If you rotate back to tablet layout the title is back.</p>

<blockquote>
<pre><code>@Override
public void setTitle(int titleId)
{
    Toast.makeText(NavigationFragmentActivity.this, titleId, Toast.LENGTH_SHORT).show();
    super.setTitle(titleId);
    getSupportActionBar().setTitle(titleId);
    getSupportActionBar().setDisplayShowTitleEnabled(true);
}
</code></pre>
</blockquote>

<p>Thanks for any help.</p>