ListView.getChildAt() 获取不在屏幕上的子视图
嗨,我有一个可扩展的列表视图,当我增加扩展它时它会滚动。然后我尝试检索所有孩子,但它给了我当前在屏幕上的孩子。我怎样才能得到不在屏幕上的孩子。 http://groups.google.com/group/android -developers/browse_thread/thread/7543f93b105c156e?fwc=1 我读了这个查询,但不明白如何重写 getview 方法来获取这些元素。我的 getgroupview 方法是这样的。
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
View v;
v=convertView;
if(v==null)
{LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.group, null);
}
return v;}
我应该做哪些修改才能得到另一个孩子
hi i have an expandable listview and its going to scroll when i increase expanded it.and then i try to retrieve all the child but its giving me children which are currently on screen. how can i get the children which are not on the screen.
http://groups.google.com/group/android-developers/browse_thread/thread/7543f93b105c156e?fwc=1
i read this query but not understand how to override the getview method for getting those element.my getgroupview method is like this.
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
View v;
v=convertView;
if(v==null)
{LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.group, null);
}
return v;}
what modification should i do for getting other child
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。它们不存在。
ListView
和ExpandableListView
回收行。You can't. They do not exist.
ListView
andExpandableListView
recycle rows.