我在屏幕顶部和底部的android cordova应用程序中获得黑色水平条纹。我已经尝试将全屏插件和标签添加到config.xml但它不会消失:
https://i.imgur.com/l2ZIaAJ.png
config.xml中:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Test</name>
<description>
Test
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="Fullscreen" value="true" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="browser" spec="^5.0.0" />
<engine name="android" spec="^6.3.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-plugin-file" spec="^4.3.3" />
<plugin name="cordova-plugin-filechooser" spec="git+https://github.com/ihadeed/cordova-filechooser.git" />
<plugin name="cordova-plugin-fullscreen" spec="^1.2.0" />
<plugin name="cordova-plugin-console" spec="^1.1.0" />
</widget>
JS:
alert("fullscreen test");
AndroidFullScreen.setSystemUiVisibility(AndroidFullScreen.SYSTEM_UI_FLAG_FULLSCREEN | AndroidFullScreen.SYSTEM_UI_FLAG_LOW_PROFILE, function(){
alert("success fullscreen");
}, function(){
alert("error fullscreen");
});
“成功全屏”得到警报,所以我不确定是什么问题。
我也尝试将其添加到清单中:
的AndroidManifest.xml:
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
没有运气。只是不能让这些黑条消失。