Can't set ExpandableListView Child DividerHeight
I'm working with ExpandableListViews, which need to have a divider between groups, but not between the the group and it's child.
I can't find a way to get this done, what I've already tried is:
Set the
android:dividerHeight
to 0. Result: there is still a space of 1dip between the group and it's child.If I then try to fill that space with a color or transparency instead of a drawable, it doesn't show, so the gap is still visible. If
android:dividerHeight
is larger than 0, it shows the 开发者_如何学运维color.If I set the
android:dividerHeight
to -1 the gap between the group and it's child dissappears. The divider between the groups obviously also dissappears.Searching in almost every corner of the web for an easy solution, but it seems that no one has encountered this problem yet.
What I've been thinking of is the following: Remove all dividers add them to the row layouts, however, this would be a lot of extra and imo unneccesary work. And I would have to remove them for each last group.
Does anybody have a clue what I mean and do you have a better solution? Thanks a lot in advance for sharing!
Cheers!
Do
Maybe simpler would be to set the divider color between group and child to the list background color?
You'r nearly there. I'm doing the same. How about this, Set dividerheight to 0px Then create your own divider in the group layout.
精彩评论