plus.webview预创建界面
来源:互联网 发布:ubuntu 关闭桌面 编辑:程序博客网 时间:2024/06/06 03:46
var mainstyle = { top: '5px', bottom: '50px', bounce: 'vertical'};mui.init({ swipeBack: false, statusBarBackground: '#999999', gestureConfig: { doubletap: true }});mui.plusReady(main);var curview;function main() { alert("初始化完毕"); CeateView(); alert(plus.webview.all()); mui('.mui-bar').on('tap', 'a', function() { var ref = this.getAttribute("href"); if (curview == ref) { alert("不需要加载"); return; } plus.webview.hide(curview, "pop-in"); curview = ref; plus.webview.show(ref, "pop-out"); })}function CeateView() { var self = plus.webview.currentWebview(); var page = plus.webview.create("page1.html", "mainpage", mainstyle); alert("create:" + page); self.append(page); plus.webview.show("mainpage"); curview = "page1"; var page1 = plus.webview.create("page2.html", "page1", mainstyle); alert("create:" + page1); self.append(page1); var page2 = plus.webview.create("page1.html", "page2", mainstyle); alert("create:" + page2); self.append(page2);}
使用mui创建,先预加载
function addView() { var page = mui.preload({ url:"img_l1.html", id:"img_l1",//默认使用当前页面的url作为id styles:{},//窗口参数 extras:{}//自定义扩展参数 });}
显示此窗口
mui('#mtab ').on('tap','img',function(){ console.log( " id00:"+this.id); var now = plus.webview.getWebviewById(this.id); // plus.webview.show(this.id); mui.openWindow(this.id+'.html',this.id,{}) })
或
//点击流图片事件 mui('#mtab ').on('tap','img',function(){ console.log( " id00:"+this.id); var now = plus.webview.getWebviewById(this.id); plus.webview.show(this.id); })
0 0
- plus.webview预创建界面
- WebView界面
- android界面加载webview
- 跳转到webview界面
- plus.webview.show 后刷新页面
- android WebView界面切换效果
- webview界面的滑动监听
- 如何创建WebView
- WebView的创建
- 用SQL*PLUS创建网页
- 调整SQL*Plus界面使用英文信息
- android 创建webview悬浮窗口
- WebView详解及创建流程
- android通过webview+jquery设计界面
- Android采用HTML设计软件界面webview
- Android上webview界面切换动画效果
- 用WebView实现启动引导界面
- HTML5+规范:Webview(管理应用窗口界面)
- linux查询cpu
- Socket 数据通信
- Majority Element解决:Moore's Voting Algorithm
- 好消息! 不用再羡慕Python有jupyter 我R也有Notebook了
- Maven 之 No compiler is provided in this environment
- plus.webview预创建界面
- myeclipse配置gradle插件
- backlog参数理解
- Style之flag标签
- 浅谈Java动态代理
- VSTO学习资源
- redis的常规部署模型
- 进程和线程之由来
- java读取excel数据