Translucent navigation bar

爱⌒轻易说出口 提交于 2020-01-17 14:03:06

问题


I want to have the content of my layout being displayed under the navigation bar (also called translucent navigation bar). After reading on the internet, it says all you have to do is add this 2 items to style applied to the activity:

<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentNavigation">true</item>

The result is, that the navigation bar is light gray and not transparent. How do all the people solve this ?


回答1:


Problem was the attribute

android:fitsSystemWindows="true"

in the root view of my layout (in this time CoordinatorLayout). This attribute prevents the content of the layout to draw behind the status and navigation bar.



来源:https://stackoverflow.com/questions/39237539/translucent-navigation-bar

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