Hi, I want to add an image icon in expandable list view .I have seen the tutorial they have added only in child elements .Is there any other way to add image icon in parent Any help would be appreciated. Thanks in advance.
+1
A:
You can try the setGroupIndicator(Drawable)
method of ExpandableListView.
Dimitar Dimitrov
2009-08-31 08:54:40
Hi, This method adds the icon to all the parent but if i want to add seperate icon for each parent respectively .Is it possible.
Sam97305421562
2009-08-31 11:28:26
If you want to really customize your group layout, why don't you try using or subclassing SimpleExpandableListAdapter? Set custom resource for expandedGroupLayout, and load the image you need on getGroupView(int, boolean, View, ViewGroup). Good luck and comment back when you see/try it.
Dimitar Dimitrov
2009-08-31 12:40:03
A:
ok
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
if(getChildrenCount(groupPosition)==0)
{
// how do i hide the group indicator ?
}
So, how can modify the group indicator for empty groups ?
superseed77
2010-07-06 18:57:05