Cordova InAppBrowser - 如何在Android中禁用URL和导航栏

时间:2013-10-09 06:58:59

标签: android cordova hybrid-mobile-app inappbrowser

我目前正在开发一款适用于Android和ios的混合应用程序。其中使用带有phonegap 3.0的inappbrowser插件。我需要隐藏网址和导航按钮。它根据帖子Cordova InAppBrowser - How to disable URL and Navigation Bar?

在ios中工作

我如何为Android项目做同样的事情

提前致谢! Arun Sathyan

2 个答案:

答案 0 :(得分:0)

你必须在html页面中使用它 看到这个

http://docs.phonegap.com/en/2.3.0/cordova_inappbrowser_inappbrowser.md.html

function onDeviceReady() {
     var ref = window.open('http://apache.org', '_blank', 'location=no');
     ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
     ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
     ref.addEventListener('exit', function() { alert(event.type); });
}

答案 1 :(得分:0)

在config.xml文件中,确保您的URL模式与allow-intent标记匹配。

<allow-intent href="http://*/*/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*" />