只要是新的聊天对象就创建一个新的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的更多相关文章

  1. cocos2d-x lua 使用ListView

    cocos2d-x lua 使用ListView version: cocos2d-x 3.6 本文主要讲述:使用Cocos Studio创建ListView,和列表项的模板,代码中通过模板创建列表的 ...

  2. Android开发10.1:UI组件适配器AdapterView(创建ListView,Adapter接口)

    @version:Android4.3 API18 @author:liuxinming 概述               AdapterView继承了ViewGroup,它的本质是容器       ...

  3. 创建ListView的基本步骤

    参考<疯狂android讲义>第2.5节P94 1.创建一个或者多个ListView <LinearLayout xmlns:android="http://schemas ...

  4. 创建ListView控件

    // 创建List控件 HWND hListView = CreateWindow(WC_LISTVIEW ,/*listview 宏的名字*/ L"" ,/*窗口标题*/ WS_ ...

  5. 使用SimpleAdapter创建ListView

    通过ArrayAdapter实现Adapter虽然简单.易用,但ArrayAdapter的功能比较有限.它的每个列表只能是TextView.如果开发者需呀实现更复杂的列表项,则可以考虑使用Simple ...

  6. Unity3D热更新之LuaFramework篇[02]--用Lua创建自己的面板

    在上篇文章 Unity3D热更新之LuaFramework篇[01]--从零开始 中,我们了解了怎么获得一个可用的LuaFramework框架. 本篇将我会先介绍一下如何配置Lua开发环境,然后分析在 ...

  7. 【Android】利用回收机制创建ListView列表实现

    MainActivity.java package com.glandroid.listviewdemo; import android.graphics.Color; import android. ...

  8. 创建ListView的基本步骤 分类: H1_ANDROID 2013-10-31 23:25 1276人阅读 评论(0) 收藏

    参考<疯狂android讲义>第2.5节P94 1.创建一个或者多个ListView <LinearLayout xmlns:android="http://schemas ...

  9. lua创建文件和文件夹

    创建文件夹: os.execute('mkdir xx') 创建文件: f = assert(io.open('a.tmp','w')) f:write('test') f:close()

随机推荐

  1. CentOS7 使用ntp设置系统时间,开机自动设置时间,

    首先如果没有安装ntp自己装一下: yum install -y ntp 然后,如果开了防火墙,记得打开自己的123端口,该端口是ntp用来同步时间的 firewall-cmd --zone=publ ...

  2. SpringBoot bootstrap 配置文件没有生效

    今天单独使用SpringBoot,发现其中的bootstrap.properties文件无法生效,改成yaml格式也无济于事. 最后调查发现原来是因为SpringBoot本身并不支持,需要和Sprin ...

  3. IM系统架构设计之浅见

    转自:http://mobile.51cto.com/hot-439693.htm 背景:除去大名鼎鼎的QQ这款即时聊天工具,还有许多细分行业的IM,比如淘宝阿里旺旺.网易泡泡.YY语音....... ...

  4. Ubuntu下的init.d管理update-rc.d

    计算机在启动的时候会自动执行一些脚本,用于启动一些应用程序服务,update-rc.d 是管理这些脚本的常用命令之一. 首先这是 LinuxQuestions 中对 update-rc.d 的定义: ...

  5. nginx搭建httpsserver

    HTTPS简单介绍 HTTPS(Hypertext Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单来讲就是HTTP的安全版. ...

  6. nullpointerxception——处理思路

    概念: 1.所谓的指针,就是java中的对象的引用.比如String s;这个s就是指针.2.所谓的空指针,就是指针的内容为空.比如上面的s,如果令它指向null,就是空指针.3.所谓的空指针异常,就 ...

  7. 一个死去的网站shige.laiyo.com

    2017年4月份的时候,研一下刚刚开始. 爬了这个网站,现在这个网站已经关闭了,这些爬虫代码也就没用了,面向特定网站爬虫本身就是没有意义的. 爬author import requests from ...

  8. Java中timer的schedule()和schedualAtFixedRate()函数的区别

    本文主要讨论java.util.Timer的schedule(timerTask,delay,period)和scheduleAtFixedRate(timerTask,delay,period)的区 ...

  9. Python实现:十进制数与(2~16进制数)之间的互相转换

    (最开始源于牛客网上的一道编程题 : [编程题] 数制转换) 将X进制转为int十进制的功能函数:(乘X次方各位数的加和法) # 将X进制转为int十进制的功能函数:(乘X次方各位数的加和法) def ...

  10. Spring AOP之Introduction(@DeclareParents)简介

    Spring的文档上对Introduction这个概念和相关的注解@DeclareParents作了如下介绍: Introductions (known as inter-type declarati ...