草庐IT

windowTranslucentNavigation

全部标签

android - windowTranslucentNavigation 问题

我想让我的导航栏半透明,所以我做了这样的事情:false@color/action_blue@color/action_blue@color/status_bartrue它运行良好,但我的工具栏和状态栏合并了,当我使用它时:false@color/action_blue@color/action_blue@color/status_bar结果是: 最佳答案 有更好的解决办法:只需将android:fitsSystemWindows="true"设置为父布局的xml。系统将负责设置正确的paddingTop

android - 透明状态栏不适用于 windowTranslucentNavigation ="false"

我正在开发一个Activity,我需要在其中使导航栏不透明,并且在运行5.0+(API21+)的设备上使状态栏透明。下面是我使用的样式,以及对我的问题的解释。AppTheme扩展Theme.AppCompat.Light.NoActionBar@color/transparentfalsetrue@color/welbe_red_transparentFullscreenTheme扩展AppThemetrue@color/transparenttrue这使应用看起来像这样如果我删除android:windowTranslucentNavigation样式,或在Fullscreen中将其