再 android 的res values 目录下 style 文件下 添加:
<style name="Theme.FullScreenDialog" parent="Theme.AppCompat.Dialog">
<!-- 上面说过,只要是Dialog,这两个属性必须设置 -->
<item name="android:windowIsFloating">false</item>
<item name="android:windowBackground">@android:color/transparent</item>
<!--设置透明状态栏,适用于SDK19(4.4)及以上版本-->
<item name="android:windowTranslucentStatus" >true</item>
<!-- 如果你不需要自定义状态栏颜色,下面两个可不要 -->
<item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="lollipop">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<!-- 透明导航栏 -->
<item name="android:windowTranslucentNavigation">false</item>
</style>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。