唉呀妈呀
唉呀妈呀
  • 发布:2019-05-10 13:03
  • 更新:2019-05-10 13:03
  • 阅读:973

【报Bug】plus.nativeObj.View draw里面设置left:‘auto’安卓闪退

分类:5+ SDK

var copyContent =
'33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333';
var nvMask = new plus.nativeObj.View("nvMask", { //先创建遮罩层
top: '0px',
left: '0px',
height: '100%',
width: '100%',
backgroundColor: 'rgba(0,0,0,0.2)'
});
nvMask.addEventListener("click", function() { //处理遮罩层点击
nvMask.hide();
nvImageMenu.hide();
})
var nvImageMenu = new plus.nativeObj.View("nvImageMenu", { //创建底部图标菜单
top: '182.5px',
left: 'auto',
height: '280px',
margin: 'auto',
width: '100%',
});
nvMask.draw([{
tag: 'img',
id: 'imgBg',
src: '/static/images/icon/close_icon.png',
position: {
top: '520px',
left: 'auto',
width: '17.5px',
height: '17.5px'
}
}])
nvImageMenu.setTouchEventRect({
top: '230px',
left: '15px',
right: '15px',
height: '40px'
});
//绘制底部图标菜单的内容
nvImageMenu.draw([{
tag: 'img',
id: 'imgBg',
src: '/static/images/icon/copy_bg.png',
position: {
top: '0',
left: 'auto',
width: '280px',
height: '100%'
}
},
{
tag: 'font',
id: 'fontDetail',
text: '您是否搜索以下商品',
textStyles: {
size: '14px',
color: '#FF6316'
},
position: {
top: '0',
left: 'auto',
}
},
{
tag: 'rect',
id: 'rectangle',
position: {
top: '90px',
left: 'auto',
width: '250px',
height: '125px'
},
rectStyles: {
color: '#FFFFFF',
radius: '10px'
}
}, {
tag: 'font',
id: 'search',
text: copyContent,
textStyles: {
size: '16px',
color: '#333333',
whiteSpace: 'normal',
},
position: {
top: '95px',
left: 'auto',// 这里设置auto在安卓上会闪退
height: '100px',
width: '222px',
}
},
{
tag: 'rect',
id: 'searchBtn',
position: {
top: '230px',
left: 'auto',
width: '250px',
height: '40px'
},
rectStyles: {
color: '#ff902d',
radius: '20px'
}
},
{
tag: 'font',
id: 'seachBtnText',
text: '搜索',
textStyles: {
size: '16px',
color: '#FFFFFF',
weight: 'bold'
},
position: {
top: '110px',
left: '0px',
}
}
])
nvMask.show()
nvImageMenu.show() //5+应支持从底部向上弹出的动画

2019-05-10 13:03 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复