展示型网站制作,青少年活动中心网站建设依据,网站 wap,上海工业设计公司使用下方代码后依旧有一条黑色的区域 overridevoid initState() {// TODO: implement initStatesuper.initState();///关闭状态栏#xff0c;与底部虚拟操作按钮SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);//隐藏状态栏#xff0c;底部按钮栏S…使用下方代码后依旧有一条黑色的区域 overridevoid initState() {// TODO: implement initStatesuper.initState();///关闭状态栏与底部虚拟操作按钮SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);//隐藏状态栏底部按钮栏SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft,DeviceOrientation.landscapeRight,]);}overridevoid dispose() {// TODO: implement disposesuper.dispose();///显示状态栏与底部虚拟操作按钮SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top, SystemUiOverlay.bottom]);SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp,DeviceOrientation.portraitDown,]);}
在这种情况下是因为相机你可以通过以下方式解决这个问题 android/app/src/main/res/values/styles.xml 并添加以下行
item nameandroid:windowLayoutInDisplayCutoutModeshortEdges/item 这就是我的“styles.xml”现在的样子
?xml version1.0 encodingutf-8?
resources
style nameLaunchTheme parentandroid:style/Theme.Light.NoTitleBar
item nameandroid:windowBackgrounddrawable/launch_background/item
/style
style nameNormalTheme parentandroid:style/Theme.Light.NoTitleBar
item nameandroid:windowBackground?android:colorBackground/item
item nameandroid:windowLayoutInDisplayCutoutModeshortEdges/item !-- This is the added line --
/style
/resources
如果你在“values-nigh”文件夹中有另一个“styles.xml”文件请确保对它做同样的操作。