开发者

How to permanently hide address bar when using PhoneGap

I've setup my Android app using the Quick Start directions using the latest PhoneGap build. When I launch the app in the Android emulator no address bar is present on the first page. However, after I follow a link on the page to a second page, a new window launches and an address bar appears on the screen. From then on, the address bar is always visible.

I would like to know how to permanently disable that a开发者_运维技巧ddress bar for the lifetime of the application. Anyone have any ideas?


Use the inapp browser plugin instead : org.apache.cordova.inappbrowser

This plugin has neatly coordinated documentation, here is the detail

https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md

To hide the address bar set the location to no, like below:

var ref = window.open('http://apache.org', '_blank', 'location=no');

Hope this helps


Use the ChildBrowser PhoneGap plugin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜