为什么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() webview html5 EventSource找不到 有哪位android大神弄过像wps那样浏览word文档 jni里面fork出来的子进程阻塞了,导致主程序apk退出的时候调用System.exit(0);会卡死 IntelliJ IDEA无法启动模拟器 AlarmManager.setRepeating 可以被重复注册吗? 找个制作自定义控件的第三方库 android 居中且文字对齐 夜间模式是怎么实现的?还有一键换主题 androidAPP不显示数据问题 百度或者高德地图开发 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