为什么ListView的getChildCount函数取得子项目数比实际少一项? 我的ListView有10个items,但是用getChildCount()函数取得的值为9,为什么会少一项呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我都数过了,是10行。getChildCount取得的难道不是个数? 用getCount可以取得所有item的个数。难道说getChildCount取得是当前屏幕可见区域的item个数?现在listview区域可见的item数正好是9个。原来真是这样。找到一篇文章是这么说的。http://qq361119908.javaeye.com/blog/737770 那么,我ListView里面的item是一个自定义的R.layout.list_items,其中包含两个TextView,我该如何根据listView的索引position值取得对应的TextView呢?1.如果用listMusic.getChildAt(index)取得list item的view,此时怎么实现position与index的对应关系呢?2.如果通过取得adapter的方式,那么,adapter.getItem(lastPlayPosition);返回的Object又是什么呢?SimpleAdapter adapter = (SimpleAdapter)listMusic.getAdapter();adapter.getItem(lastPlayPosition); ExpandableListView实例(一)_数据库增删改查处理和listitem点击长按处理http://blog.csdn.net/lk_blog/article/details/7562987ExpandableListView实例(二)_两种方式实现QQ中组后面显示子条目数量效果http://blog.csdn.net/lk_blog/article/details/7563355ExpandableListView实例(三)_实现QQ中"未分组"效果和"未分组"不可编辑删除功能http://blog.csdn.net/lk_blog/article/details/7563371 取个数很简单啊getAdapter.getCount() 语音声控 关于平板LCD调试的一个问题 谁给个飞机游戏源码,真机不卡顿的那种谢谢了!n_n 全盘搜索然后运行搜索的程序 ListFragment中onListItemClick没有响应 用zxing包去扫描二维码,竖屏下摄像头预览图像拉伸,怎么解决? 怎么获取手机上显示的时区 获取可用内存不准确,咋整 手机联系人 Android中Fatal signal 11 (SIGSEGV) at 0x6df6d7bf (code=2), thread 31535 layout中的android:background配置错误 编译android的单个模块出现问题
getChildCount取得的难道不是个数?
难道说getChildCount取得是当前屏幕可见区域的item个数?现在listview区域可见的item数正好是9个。原来真是这样。找到一篇文章是这么说的。
http://qq361119908.javaeye.com/blog/737770
我该如何根据listView的索引position值取得对应的TextView呢?1.如果用listMusic.getChildAt(index)取得list item的view,此时怎么实现position与index的对应关系呢?2.如果通过取得adapter的方式,那么,adapter.getItem(lastPlayPosition);返回的Object又是什么呢?
SimpleAdapter adapter = (SimpleAdapter)listMusic.getAdapter();
adapter.getItem(lastPlayPosition);
http://blog.csdn.net/lk_blog/article/details/7562987ExpandableListView实例(二)_两种方式实现QQ中组后面显示子条目数量效果
http://blog.csdn.net/lk_blog/article/details/7563355ExpandableListView实例(三)_实现QQ中"未分组"效果和"未分组"不可编辑删除功能
http://blog.csdn.net/lk_blog/article/details/7563371