我正在制作一个包含 a ExpandableListView
、 aCheckedTextView
和 a的自定义视图ListView
:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/filtersDialogView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="200dp"
android:orientation="vertical" >
<ExpandableListView
android:id="@+id/filtersListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<CheckedTextView
android:id="@+id/onlyShowAvailableItemsCheckedTextView"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:gravity="center_vertical"
android:paddingLeft="8dip"
android:paddingRight="8dip"
android:text="@string/OnlyShowAvailableItems" />
<ListView
android:id="@+id/categoriesListView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
问题是CheckTextView
是固定的并且两个列表是独立滚动的(这对于该布局是正常的)。此外,当我从 展开列表项时ExpandableListView
,CheckedTextView
和 另一个ListView
变得隐藏。我想制作一个包含所有这些元素的列表,当我展开第一个列表的元素时(第二个列表的单元格不可展开),这些元素可以正确滚动和调整大小。我怎样才能做到这一点?是否可以在不修改列表的适配器和控制器的情况下实现它CheckedTextView
?谢谢