|
安卓使用了网上找到的插件cordova-plugin-themeablebrowser,装到手机上打开,怎么顶部是一条白条,没能显示任何按钮,但用手去触摸那些位置却有按钮的功能,但就是看不到按钮;我用的是插件说明上的代码,版主和高手们看看是怎么回事?是不是Wex5识别不了下面的一些代码?
插件地址:
https://github.com/initialxy/cordova-plugin-themeablebrowser
代码如下:
cordova.ThemeableBrowser.open('http://apache.org', '_blank', {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#f0f0f0ff'
},
title: {
color: '#003264ff',
showPageTitle: true
},
backButton: {
image: './main/img/back.png',
imagePressed: './main/img/back_pressed.png',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: './main/img/forward.png',
imagePressed: './main/img/forward_pressed.png',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: './main/img/close.png',
imagePressed: './main/img/close_pressed.png',
align: 'left',
event: 'closePressed'
},
customButtons: [
{
image: './main/img/share.png',
imagePressed: './main/img/share_pressed.png',
align: 'right',
event: 'sharePressed'
}
],
menu: {
image: './main/img/pngmenu.png',
imagePressed: './main/img/menu_pressed.png',
title: 'Test',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'helloPressed',
label: 'Hello World!'
},
{
event: 'testPressed',
label: 'Test!'
}
]
},
backButtonCanClose: true
}).addEventListener('backPressed', function(e) {
alert('back pressed');
}).addEventListener('helloPressed', function(e) {
alert('hello pressed');
}).addEventListener('sharePressed', function(e) {
alert(e.url);
}).addEventListener(cordova.ThemeableBrowser.EVT_ERR, function(e) {
console.error(e.message);
}).addEventListener(cordova.ThemeableBrowser.EVT_WRN, function(e) {
console.log(e.message);
}); |
|
|