How to remove specific space between parent and child in an ExpandableListView

后端 未结 10 2215
太阳男子
太阳男子 2021-02-20 09:10

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

10条回答
  •  自闭症患者
    2021-02-20 09:39

    Assuming that you want spacing between the parents, but not between parent & child. I have failed to find a proper way of achieving it. So I did a not a smart fix, by not setting the divider height, instead since I had a custom layout for every parent item, I added a LinearLayout with a fixed height of 25dp at the top of my custom parent layout, as a result I could achieve the desire functionality, but there was a side effect , when you touch the list item, the spacing as well as the list item both are highlighted on touch.

提交回复
热议问题