Sencha Touch 2 toolbar 按钮模仿开始菜单
来源:互联网 发布:树的遍历递归算法 编辑:程序博客网 时间:2024/05/17 22:45
如图
实际上就是一个overlay控件 里面加载了panel 里面又包含了个list
首先定义工具栏和按钮
按钮定义如下:
{
xtype:'button',
iconCls: 'bookmarks',
text:'开始',
itemId:'start'
},
定义功能列表Panel如下
Ext.define('ipad.view.phone.tabpanel.ToolList', {
extend: 'Ext.Panel',
xtype: ['toolListPanel','widget.toolListPanel'],
config:{
layout:'vbox',
left: 0,
top: 0,
// Make it modal so you can click the mask to hide the overlay
modal: true,
hideOnMaskTap: true,
hidden: true,
width: 260 ,
height: '70%',
// Here we specify the #id of the element we created in `index.html`
contentEl: 'content',
// Style the content
styleHtmlContent: true,
scrollable: false,
// Insert a title docked at the top with a title
items: [
{
xtype:'list',
flex:1,
itemTpl: '<div class="contact">{functionName}</div>',
data: [
{ functionId: '001', functionName: '课程库' },
{ functionId: '002', functionName: '精品课程' },
{ functionId: '003', functionName: '学习界面' },
{ functionId: '004', functionName: '学习计划' },
{ functionId: '005', functionName: '我的笔记' },
{ functionId: '006', functionName: '通讯录' }
//{ functionId: '007', functionName: 'Nguyen' },
//{ functionId: '008', functionName: 'Elias' }
]
}]
}
});
为按钮增加单击监听 单击触发onStart方法
onStart:function(button){
var tool = this.getToolListPanel(); //要自己定义toolListPanel为刚才上文的panel
tool.showBy(button);
},
- Sencha Touch 2 toolbar 按钮模仿开始菜单
- Creating Sencha Touch Toolbar Buttons
- sencha touch 自定义cardpanel控件 模仿改进NavigationView 灵活添加按钮组,导航栏,自由隐藏返回按钮
- 开始Sencha Touch 2
- Sencha Touch 2 Menu
- sencha touch 2
- Sencha Touch 2 Map
- sencha touch 彩色图标按钮(button+ico)
- sencha touch 模仿tabpanel导航栏TabBar的实现代码
- 用Sencha Touch SDK TOOLS 编译Sencha touch 2 程序
- Sencha touch 2 定义全局变量
- Sencha Touch 2 Global Variable
- sencha touch 2 滚动分页
- sencha touch 2 二级联动
- sencha touch 2 常用组件
- Sencha Touch 2 快速入门
- Sencha Touch开发入门2
- sencha touch 2 chrome调试
- hadoop集群监控工具ambari安装
- U-boot1.1.6之Makefile和mkconfig分析 .
- 如何选好Android开发书籍和教程[总结]
- DisplayHardware
- SSh框架问题集结
- Sencha Touch 2 toolbar 按钮模仿开始菜单
- OpenGL函数思考-glMatrixMode
- VC++WM_TIMER 定时器使用方法
- Android核心分析28篇,强烈推荐android初学者,android进阶者看看这个系列教程
- spring学习----MethodInvokingFactoryBean(二)
- warning: the 'gets' function is dangerous and should not be used.的解决办法
- hdu 4382 模拟 矩阵连乘 高精度
- 单片机驱动DM9000网卡芯片(详细调试过程)
- myeclipse添加对hinernate4的hinernate.cfg.xml智能提示