cocos2d-js listView用法
来源:互联网 发布:淘宝王者荣耀cdk靠谱吗 编辑:程序博客网 时间:2024/05/17 07:47
1.在cocos studio中添加listView。
2.在cocos studio中添加一个layout类型的listItem,设置为不可见。
3.在这个listitem中添加你要在listView中每一项显示的内容。
例如这样:
这个item中有文字,有图片image是layout类型。
4.在代码中调用:
(1)this.mode = this.endLayer.getChildByName("item");获取这个item
(2)然后获得这个item中的每一项进行赋值
var item = this.mode.clone();
item.setVisible(true);
var textLine = item.getChildByName("line");
(3)赋值完成后,调用这句this.endLayerList.pushBackCustomItem(item);加入listView。
阅读全文
0 0
- cocos2d-js listView用法
- Cocos2d-JS schedule用法
- Cocos2d-JS schedule用法
- cocos2d-js PageView用法
- cocos2d js ScrollView的用法
- cocos2d js Pageview的用法
- cocos2d-js cc.DrawNode用法示例
- cocos2d-js cc.DrawNode用法示例
- cocos2d-js浅谈schedule的用法
- listView用法
- listview用法
- ListView 用法
- ListView用法
- Listview用法
- listview用法
- ListView用法
- listView用法
- listview用法
- transform.SetParent(ParentTra) 如果ParentTra的scale不是(1,1,1),会导致子物体变形
- Mysql笔记:修改默认数据目录
- UVA
- 基于情感字典的文本情感极性分析
- PAT乙级1053. 住房空置率 (20)
- cocos2d-js listView用法
- Java并发包中CountDownLatch的工作原理、使用示例
- POJ1061 青蛙的约会 拓展欧几里得
- hbase坑二:shell终端执行命令报错ERROR:org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
- ZeroMQ,史上最快的消息队列 —– ZMQ的学习和研究
- java 基础三
- Linux 源码安装mysql及配置
- 不安全的代码: 教你“随心所欲”地在内存中操作Java的类和对象(2)
- JavaMail