我的 android cordova 应用程序在屏幕顶部和底部出现黑色水平条。我尝试将全屏插件和标签添加到 config.xml 但它不会消失:
https://i.stack.imgur.com/esFEL.png https://i.stack.imgur.com/esFEL.png
配置.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="[email protected] /cdn-cgi/l/email-protection" 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"
没有运气。只是无法让这些黑条消失。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)