in Android ExpandableListView, how to change the margin between two groups
How to change the margin between two groups in an ExpandableListView?
If I insert two groups into an ExpandableListView, I got the following
PARENT1 (collapsed)
PARENT2 (collapsed)
How can I make it look like this?
PARENT1 (collapsed)
(some space)
PARENT2 (collapsed)
Note, I want to the space between collapsed group only. No 开发者_运维知识库space among child items
Add padding
@Override
public View getGroupView(final int groupPosition, final boolean isExpanded, View convertView, final ViewGroup parent) {
...
convertView.setPadding(0, 30, 0, 0);
return convertView;
}
精彩评论