Activity's title area doesn't expand if the title is set from a Fragment that doesn't contribute to the options menu

半城伤御伤魂 提交于 2019-12-23 21:33:20

问题


This is very similar to the issue mentioned here, which mostly fixed my problem.

However, if you are setting the title from a fragment that does not contribute to the options menu, then the title area won't expand. This can cause an ellipsis if the initial title was very small, even though there may be plenty of room in the action bar for it.

My guess is that if the fragment does contribute to the options menu then it causes that title area's width to be recalculated. Is there a way to force this to happen?

来源:https://stackoverflow.com/questions/25330553/activitys-title-area-doesnt-expand-if-the-title-is-set-from-a-fragment-that-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!