Toolbar#setTitle() 无效

2018-08-13  本文已影响0人  Jiun俊

I was able to solve this issue using the following answer provided by @DanielPersson at how to pin title in Toolbar inside CollapsingToolbarLayout:

collapsingToolbarLayout.setTitleEnabled(false);
toolbar.setTitle("My Title");

By calling setTitleEnabled(false);, the title appeared in the toolbar.

原文链接:StackOverflow

上一篇 下一篇

猜你喜欢

热点阅读