从stackOverFlow的答案中:
The internal implementation of the support library just checks if the Toolbar has a title (not null) at the moment the SupportActionBar is set up. If there is, then this title will be used instead of the window title. You can then set a dummy title while you load the real title.
mActionBarToolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
mActionBarToolbar.setTitle("");
setSupportActionBar(mActionBarToolbar);
later...
mActionBarToolbar.setTitle(title);
地址:http://stackoverflow.com/questions/26486730/in-android-app-toolbar-settitle-method-has-no-effect-application-name-is-shown
写在onStart里面,当程序挂起的时候再次进入,应该是能看到title的。
但是第一次是没有看到,或许可以推测是否有库对flag进行判断第一次进入的时候就不进行某些操作了,因为第二次进入的时候已经有设置了的title了,所以就直接进行了调用。
(仅为推测,具体不知库是怎么实现的)