简体   繁体   English

锁定后应用未处于全屏状态-解锁

[英]App is not at full screen after lock - unlock

I noticed that when I open my app and wait enough for my phone locks itself and when i unlock it the current content view in not in full screen mode. 我注意到,当我打开我的应用程序并等待足够长的时间使我的手机锁定时,当我解锁它时,当前的内容视图不是处于全屏模式。 It does not show the top bar but instead it's all black line... If i go to another activity and go back it fixes again. 它不显示顶部栏,而是全黑线...如果我转到另一个活动然后返回,它将再次修复。 Things I tried: 1. Inserting 我尝试过的事情:1.插入

requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN);

into onCreate, onResume, onRestart methods. 进入onCreate,onResume,onRestart方法。

  1. Inserting 插入

    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:theme =“ @ android:style / Theme.Black.NoTitleBar.Fullscreen”

into androidmanifest.xml 进入androidmanifest.xml

ANY OTHER SUGGESTIONS? 还有其他建议吗?

当我在模拟器上运行应用程序时,我遇到了同样的问题,这可能是由于模拟器本身存在任何错误所致,请尝试在真实设备上运行应用程序,希望在那里不会出现此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM