Can you help me identify why there is a space between the group and the child? In my case I want spaces between all groups and the child should be right below the group with no
Modify the view's padding in the method public View getChildView()
using the setPadding() method of the view.
Example:
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
View convertView, ViewGroup parentView){
final Departure departure = departures.get(groupPosition);
if(isLastChild)
expListView.setDividerHeight(DIVIDER_HEIGHT);
// Inflate childrow.xml file for child rows
convertView = inflater.inflate(R.layout.view_departure_details, parentView, false);
//Data handling...
convertView.setPadding(0, 0, 0, 0);
return convertView;
}
In the same way, if you want modify padding of the group, you will have to modify the padding in the getGroupView()
method.