如何用三星 Galaxy S10 和 S10+ 实现全屏模式,以下代码对我不起作用:
getWindow().getDecorView().setSystemUiVisibility(
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
它隐藏了状态栏的内容,但它并没有隐藏它自己的状态栏:(
请帮忙
最佳答案
以您的应用程序的样式为我解决以下问题:
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
有关支持抠图的更多详细信息,请查看:
关于android - Galaxy S10、S10+ 全屏模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55130940/