本文介绍了如何隐藏组ExpandableListView在安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在ExpandableListView如果我只有一组。我想隐藏组,仅该集团的数据显示。请帮我
解决方案在ExpandableListView如果我只有一组。我想隐藏组,仅该集团的数据显示。请帮我
解决方案我有同样的问题,这solveed我的问题
如果(groupPosition == 0){
convertView = layoutInflater.inflate(R.layout.blank_layout,NULL);
} 其他 {
convertView = layoutInflater.inflate(R.layout.group_indicator_cell,NULL);
}
这将空白的第0 groupof名单。
在哪里留白的布局与内部具有layout_height = 0dp一些视图的布局。有用!
In ExpandableListView if I only have one group. I want to hide that group, only the group's data show that. Please help me
I had the same problem and this solveed my issue.In your Listview's adapter add the following to the getGroupView.
if (groupPosition == 0) {
convertView = layoutInflater.inflate(R.layout.blank_layout, null);
} else {
convertView = layoutInflater.inflate(R.layout.group_indicator_cell,null);
}
This will blank the 0th groupof the list.
Where blank layout is a layout with some view inside having layout_height=0dp.It works!
这篇关于如何隐藏组ExpandableListView在安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!