Android 状态栏隐藏无效
高洛峰
高洛峰 2017-04-17 17:59:45
0
3
452

项目中涉及视频播放,全屏的时候状态栏一直存在需要隐藏,但实验许久,状态栏一直不能消除!!!自己手写了一个demo,动态隐藏状态栏没有问题....但在我的项目中确没有效果,我把项目中的manifest文件配置全部都放demo中实验,demo没有问题....我设置this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)成这样,布局已经全屏了,但是状态栏还是覆盖在上面..动态设置setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN)则没有任何效果...设置状态栏透明有效果.....求大神指点

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
黄舟

If you are using as, you don’t need to inherit AppCompatActivity, you have to inherit ordinary activity

伊谢尔伦

Thanks to the brother upstairs for giving me a direction... Sure enough, there is a problem with the inherited activity, although what I inherited is not AppcomayActivity

黄舟

@fuquan Solved question Why are you still inviting me? I haven't seen the code configuration of the questioner, so I can't determine the problem based on this description alone!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template