我在警告对话框(自定义)中使用可扩展列表视图。
我正在设置列表视图,如下所示:
alertDialogBuilder.setView(myView);
但是我注意到列表没有伸展以占据整个视图,我必须在该列表中滚动,如下图所示:
这是我的xml代码:
<ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listview"
android:layout_width="match_parent"
android:background="@android:color/white"
android:groupIndicator="@null"
android:scrollbars="none"
android:layout_height="wrap_content"
/>
以前有没有人遇到过这个问题或者知道如何解决这个问题,我可以设置可扩展列表视图的高度,但我不想克服这个问题。