Commit 3f44ca3d authored by hbcui1984's avatar hbcui1984

android 4.0以下版本暂不支持透明webview遮罩

parent dd8400e3
......@@ -78,8 +78,12 @@
</div>
<script type="text/javascript" charset="utf-8">
//关于backbutton和menubutton两个按键的说明,在iOS平台不存在,故需隐藏
if(!mui.os.android){
document.getElementById("android-only").style.display = "none";
var span = document.getElementById("android-only")
if(span){
span.style.display = "none";
}
}
var subWebview=null,template=null,index=null;
mui.plusReady(function () {
......
......@@ -54,7 +54,9 @@
aniShow:'none'
}
});
//创建遮罩页面;
//创建遮罩页面,使用透明webview解决index页面、list页面创建div遮罩不同步的问题;
//android 4.0以下版本不支持透明webview,故4.0以下暂不遮罩;
if(mui.os.android&&parseFloat(mui.os.version)>4.0){
mask = mui.preload({
id:"index-mask",
url:"index-mask.html",
......@@ -66,6 +68,8 @@
popGesture:"none"
}
});
}
},200);
});
......@@ -80,7 +84,7 @@
menu.show();
//显示遮罩
setTimeout(function () {
mask.show('none');
mask&&(mask.show('none'));
},150);
//主窗体开始侧滑;
mui.currentWebview.setStyle({
......@@ -98,7 +102,7 @@
function closeMenu(){
if(showMenu){
//关闭遮罩;
mask.hide();
mask&&(mask.hide());
//主窗体开始侧滑;
mui.currentWebview.setStyle({
left: showMenu ? '0' : '70%',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment