Kreshnik Kreshnik - 4 months ago 57
Android Question

ExpandableListView, how to set the child height?

I'm trying to set the ExpandableListView item (

) height. Can it be set via xml (I don't need the divider height):


or it should be used this method, by manipulating the convertView:

public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) { ... }

Thanks in advance.


ListView child views can be different heights, so we don't set a one-size-fits all height in the ListView's xml. Rather you can set a specific height in each of the different convertView xml's that you are inflating.