android expandablelistview, wie man Raum zwischen Gruppeneinträgen einstellt
Ich habe eine erweiterte Listenansicht und möchte einen Abstand (oder einen Rand) zwischen den von mir verwendeten Gruppenelementen hinzufügenmargin-botton
Bei den Gruppenelementen funktioniert es, aber jetzt wird es auch auf das Gruppenelement und seine untergeordneten Elemente angewendet. Ich möchte ein Leerzeichen zwischen den Gruppenelementen und nicht zwischen einem Gruppenelement und seinem untergeordneten Element lassen. Ich arbeite wie folgt:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#FFFFFF">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="serif"
android:textSize="25dip"
android:textColor="#025f7c"
android:text="@string/tv_allAddresses"
android:layout_gravity="center"
android:layout_marginTop="20dip"
android:layout_marginBottom="25dip"/>
<ExpandableListView
android:id="@+id/elv_all_addresses_addresses"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dip">
</ExpandableListView>
</LinearLayout>
Gruppen-XML<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_all_address_group_groupName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="30dip"
android:textColor="#000000"
android:textSize="20dip"
android:typeface="serif" />
</LinearLayout>
Kind xml<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/tv_all_address_child_label"
android:paddingLeft="50dip"
android:typeface="serif"
android:textSize="15dip"
android:textColor="@color/BlueViolet"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_all_address_child_value"
android:textColor="#000000"
android:layout_marginLeft="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>