lua 创建listview
只要是新的聊天对象就创建一个新的listview
local name = tolua.cast(UIHelper:seekWidgetByName(self.nameItem, "name"), "Label");
local playerName = name:getStringValue();
if nil == self.privateChatList[name:getTag()] then
local ChatListView = ListView:create();
if ChatListView == nil then
print("===========ChatListView为空");
return;
end
ChatListView:setSize(self.fullContent:getSize());
--ChatListView:setAnchorPoint(ccp(0, 0));
--ChatListView:setPosition(ccp(200, 200));
ChatListView:setGravity(LISTVIEW_GRAVITY_LEFT);
self.privateChatList[name:getTag()] = ChatListView;
self.contentBg:addChild(ChatListView);
end local customItem = Layout:create();
customItem:setSize(CCSizeMake(self.fullContent:getSize().width, ));
customItem:setAnchorPoint(ccp(, ));
self:initCustomItem( customItem );
self.privateChatList[name:getTag()]:pushBackCustomItem(customItem);
lua 创建listview的更多相关文章
- cocos2d-x lua 使用ListView
cocos2d-x lua 使用ListView version: cocos2d-x 3.6 本文主要讲述:使用Cocos Studio创建ListView,和列表项的模板,代码中通过模板创建列表的 ...
- Android开发10.1:UI组件适配器AdapterView(创建ListView,Adapter接口)
@version:Android4.3 API18 @author:liuxinming 概述 AdapterView继承了ViewGroup,它的本质是容器 ...
- 创建ListView的基本步骤
参考<疯狂android讲义>第2.5节P94 1.创建一个或者多个ListView <LinearLayout xmlns:android="http://schemas ...
- 创建ListView控件
// 创建List控件 HWND hListView = CreateWindow(WC_LISTVIEW ,/*listview 宏的名字*/ L"" ,/*窗口标题*/ WS_ ...
- 使用SimpleAdapter创建ListView
通过ArrayAdapter实现Adapter虽然简单.易用,但ArrayAdapter的功能比较有限.它的每个列表只能是TextView.如果开发者需呀实现更复杂的列表项,则可以考虑使用Simple ...
- Unity3D热更新之LuaFramework篇[02]--用Lua创建自己的面板
在上篇文章 Unity3D热更新之LuaFramework篇[01]--从零开始 中,我们了解了怎么获得一个可用的LuaFramework框架. 本篇将我会先介绍一下如何配置Lua开发环境,然后分析在 ...
- 【Android】利用回收机制创建ListView列表实现
MainActivity.java package com.glandroid.listviewdemo; import android.graphics.Color; import android. ...
- 创建ListView的基本步骤 分类: H1_ANDROID 2013-10-31 23:25 1276人阅读 评论(0) 收藏
参考<疯狂android讲义>第2.5节P94 1.创建一个或者多个ListView <LinearLayout xmlns:android="http://schemas ...
- lua创建文件和文件夹
创建文件夹: os.execute('mkdir xx') 创建文件: f = assert(io.open('a.tmp','w')) f:write('test') f:close()
随机推荐
- Linux-TCP 出现 RST 的几种情况
导致“Connection reset”的原因是服务器端因为某种原因关闭了Connection,而客户端依然在读写数据,此时服务器会返回复位标志“RST”,然后此时客户端就会提示“java.net.S ...
- postmessage and sendmessage
从msdn上看二者的解释: postmessage : Places (posts) a message in the message queue associated with the thread ...
- 运维自动化之Cobbler系统安装使用详解[good]
一.简介 Cobbler是一个快速网络安装linux的服务,而且在经过调整也可以支持网络安装windows.该工具使用python开发,小巧轻便(才15k行python代码),使用简单的命令即可完成P ...
- 进阶之路(基础篇) - 010 Arduino 函数(基本、串口、SPI)
一.基本函数 pinMode(引脚号,模式); digitalWrite(引脚号,电平状态); //默认低电平(或浮空) digitalRead(数字输入端口号); analogRe ...
- 【jsp】Servlet与jsp之间的传值
Servlet与JSP 之间的传值有两种情况:JSP -> Servlet, Servlet -> JSP. 通过对象 request和 session (不考虑 application) ...
- Web压力架构
原文地址:https://www.cnblogs.com/lori/archive/2015/03/27/4370827.html Web压力架构... 1 一 系统性能测试概述... 1 1.1 性 ...
- xtrabackup部分备份数据库 Partial Backups
官方文档: 部分备份: http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/partial_backups_innobacku ...
- 再说Android RecyclerView局部刷新那个坑
RecyclerView局部刷新大家都遇到过,有时候还说会遇见图片闪烁的问题. 优化之前的效果: 优化之后的效果: 如果想单独更新一个item,我们通常会这样做,代码如下: mLRecyclerV ...
- 迁移TFS,批量将文档导入SharePoint 2013 文档库
一.需求分析 公司需要将存在于旧系统(TFS)所有的文档迁移至新系统(SharePoint 2013).现已经将50G以上的文档拷贝到SharePoint 2013 Server上.这些文档是一些不规 ...
- java appium webview切换处理
Set<String> contexts = driver.getContextHandles(); for(String item :contexts){ // NATIVE_APP / ...