sencha touch中实现页面之间的互相跳转
来源:互联网 发布:政府软件外包项目 编辑:程序博客网 时间:2024/06/06 01:19
这两天应为一个页面跳转把我整的死去活来啊!官网的API不给力啊!资料太少了,害的我浪费了好长时间,最终还是弄好了,发现了一个关键问题所在:如果要使用Ext.getCmp()来得到视图或者页面组建就得在引用的页面中添加id属性,因为Ext.getCmp()是通过id来取东西的。明白这点后下面的事就好办多了。
首先在控制层里面定义按钮的事件,并映射组建。
config:{ refs:{ camera:'#cameraview',//拍照页面 description:'#descriptionview',//问题描述页面 corrective:'#correctiveview',//整改要求页面 captureButton:'button[action=captureButton]',//#拍照#拍照按钮 selectButton:'button[action=selectButton]',//#拍照#选择照片按钮 btnCameraNext:'button[action=btnCameraNext]',//#拍照#下一页按钮 btnCameraSave:'button[action=btnCameraSave]',//#拍照#保存按钮 selectTemplate:'button[action=selectTemplate]',//#问题描述#选择模板按钮 btnDescriptionBack:'button[action=btnDescriptionBack]',//#问题描述#上一步按钮 btnDescriptionSave:'button[action=btnDescriptionSave]',//#问题描述#保存按钮 btnDescriptionNext:'button[action=btnDescriptionNext]',//#问题描述#下一页按钮 btnCorrectiveBack:'button[action=btnCorrectiveBack]',//#整改要求#上一步按钮 btnCorrectiveSave:'button[acyion=btnCorrectiveSave]',//#整改要求#保存按钮 btnCorrectiveSubmit:'button[action=btnCorrectiveSubmit]'//#整改要求#提交按钮 }, control:{ //按钮事件 captureButton:{ tap:'onCaptureButton' }, selectButton:{ tap:'onSelectButton' }, btnCameraNext:{ tap:'onCameraNext' }, btnDescriptionBack:{ tap:'onDescriptionBack' }, btnDescriptionNext:{ tap:'onDescriptionNext' }, btnCorrectiveBack:{ tap:'onCorrectiveBack' }, } }
下面是具体的上一页、下一页的翻页事件。虽说有点繁琐,但功能算是实现了。
//向左翻页slideLeftTransition:{ type: 'slide', direction: 'left'},//向右翻页slideRightTransition: { type: 'slide', direction: 'right'},onCameraNext:function(){ Ext.Viewport.animateActiveItem( Ext.getCmp('descriptionview'), this.slideLeftTransition );},onDescriptionBack:function(){ Ext.Viewport.animateActiveItem( Ext.getCmp('cameraview'), this.slideRightTransition );},onDescriptionNext:function(){ Ext.Viewport.animateActiveItem( Ext.getCmp('correctiveview'), this.slideLeftTransition );},onCorrectiveBack:function(){ Ext.Viewport.animateActiveItem( Ext.getCmp('descriptionview'), this.slideRightTransition );}
- sencha touch中实现页面之间的互相跳转
- sencha touch页面之间的相互跳转
- HTML5历史页面之间的互相跳转
- 【SENCHA TOUCH】页面动画跳转切换
- Sencha Touch页面跳转创建返回上一级按钮的设计思路
- Sencha Touch页面跳转创建返回上一级按钮的设计思路
- sencha touch 中实现一个view的刷新
- PageControl实现页面之间的跳转
- Intent 实现页面之间的跳转
- mfc多页面之间的跳转实现
- sencha touch 搜索功能search的实现
- sencha touch中datepicker的汉化
- sencha touch 的4中build
- Sencha Touch中TabPanel组件的使用
- sencha touch中使用deftjs的方法
- Sencha Touch MVC 中 store 的使用
- sencha touch实现分页
- sencha-touch中adapter
- java实现冒泡,插入,选择排序
- Android中资源文件夹:res/raw和assets
- 可悲呀,可悲!!!这就是我们目前的高等教育
- barebox简要分析
- 条件变量(Condition Variable)详解
- sencha touch中实现页面之间的互相跳转
- 用java实现简单的网络通信,相当于一个最简单的控制台qq(附代码)
- System.load()与System.loadlibrary()的区别
- Using the PIA Welcome Message
- Moving the Search Box
- IBM WebSphere MQ配置(单向)
- fedora 17 安装 vmware tool
- 云计算数据中心运维管理要点
- 解决Xcode 4.3.2的"Could not insert new outlet connection"问题