const pages = getCurrentPages();
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview();
const icon1 = new plus.nativeObj.Bitmap('icon1');
icon1.load('/static/xinxi.png')
const icon2 = new plus.nativeObj.Bitmap('icon2');
icon2.load('/static/saoma.png')
const footer = new plus.nativeObj.View("footer",
{
bottom:'0',
left:'0',
right: '0',
height:'50px',
backgroundColor:'#91b72d'
}
);
const infoIcon = new plus.nativeObj.View("infoIcon", {left: 'auto', bottom: '0', width: '50px', height:'50px', backgroundColor:'#91b72d'})
const cameraIcon = new plus.nativeObj.View("cameraIcon", {right: 'auto', bottom: '0', width: '50px', height:'50px', backgroundColor:'#91b72d'})
infoIcon.drawBitmap(icon1, {top:'0',left:'0',width:'100%',height:'100%'}, {top:'10px',left:'10px',width:'30px',height:'30px'});
cameraIcon.drawBitmap(icon2, {top:'0',left:'0',width:'100%',height:'100%'}, {top:'10px',left:'10px',width:'30px',height:'30px'});
currentWebview.children()[0].append(footer);
currentWebview.children()[0].append(infoIcon);
currentWebview.children()[0].append(cameraIcon);
infoIcon与cameraInfo重叠在左下角了,cameraIcon写的是right auto,怎么会在左边
1 个回复
TomVision (作者)
现在左右的按钮通过获取设备宽度减去按钮宽度 设置left解决 了