【发布时间】:2015-03-08 02:33:30
【问题描述】:
我和How to remove specific space between parent and child in an ExpandableListView 几乎有同样的问题。
我有一个 ExpandableListView,我想将我的组分开,而当它展开时,组和第一个孩子之间没有间隙。
我尝试移除分隔线,但它使我的组项目靠近在一起,它们之间根本没有空间。
我还尝试在组上使用底部边距,在子级上使用负边距,但子级与父组分开。
这是我的代码:
<ExpandableListView android:id="@android:id/list" android:layout_width="match_parent"
android:layout_height="match_parent" android:groupIndicator="@null"
android:layout_gravity="center_horizontal|top"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:childDivider="#00000000"
android:layout_marginTop="10dp"/>
就像我的组之间有一个很好的差距,但是当我展开它们时,第一个孩子与父母隔开相同的 8dp 高度。
【问题讨论】:
标签: android expandablelistview