在我的应用程序中,我有3个expandableListview,如下所示。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:orientation="vertical" >
<LinearLayout
android:layout_width="280dp"
android:layout_height="fill_parent"
android:background="@color/filter_items_background"
android:layout_gravity="end"
android:clickable="true"
android:orientation="vertical" >
<!-- Gender -->
<TextView
android:id="@+id/listSelectionHeaderTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/filter_groups_background"
android:gravity="center_vertical"
android:minHeight="@dimen/filterFragment__itemHeight"
android:paddingLeft="20dp"
android:text="@string/filter_interestedin"
android:textColor="#8F8F8F"
android:textSize="20sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/filter_items_background"
android:minHeight="@dimen/filterFragment__itemHeight"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="10dp" >
<TextView
android:id="@+id/men_itemText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="@string/filter_men"
android:textColor="@android:color/white"
android:textSize="16sp" />
<ToggleButton
android:id="@+id/men_toggleButton"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/custom_switch_drawable"
android:textOff=""
android:textOn="" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/filter_items_background"
android:minHeight="@dimen/filterFragment__itemHeight"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="10dp" >
<TextView
android:id="@+id/women_itemText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="@string/filter_women"
android:textColor="@android:color/white"
android:textSize="16sp" />
<ToggleButton
android:id="@+id/women_toggleButton"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/custom_switch_drawable"
android:textOff=""
android:textOn="" />
</RelativeLayout>
<!-- Age -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/filter_groups_background"
android:gravity="center_vertical"
android:minHeight="@dimen/filterFragment__itemHeight"
android:orientation="horizontal"
android:paddingRight="10dp" >
<TextView
android:id="@+id/ageHeaderTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingLeft="20dp"
android:text="@string/filter_age"
android:textColor="#8F8F8F"
android:textSize="20sp" />
<TextView
android:id="@+id/ageValuesTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingLeft="20dp"
android:text="Sample"
android:textColor="@android:color/white"
android:textSize="20sp" />
</RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/filter_items_background"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="10dp" >
<SeekBar
android:id="@+id/age_seekBar_from"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<SeekBar
android:id="@+id/age_seekBar_to"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<ExpandableListView
android:id="@+id/expandableListView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:background="#000000"
android:groupIndicator="@android:color/transparent"
android:saveEnabled="true" />
<ExpandableListView
android:id="@+id/expandableListView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:background="#000000"
android:groupIndicator="@android:color/transparent"
android:saveEnabled="true" />
<ExpandableListView
android:id="@+id/expandableListView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:background="#000000"
android:groupIndicator="@android:color/transparent"
android:saveEnabled="true" />
</LinearLayout>
</LinearLayout>
我的问题是当我打开其中一个expandablelistview时,其他的expandablelistview没有显示...我想打开一个expandablelistview的子项并启用scroll和其他expandablelistview。