您的位置:首页 > 移动开发 > Android开发

android之ExpandableListView高度显示不全

2015-12-16 17:08 549 查看
<ScrollView

android:id="@+id/myinfo_order_scrollview"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/bg_white">



<ExpandableListView

android:id="@+id/myinfo_help_listview"

android:layout_width="match_parent"

android:layout_height="wrap_content" >

</ExpandableListView>

</ScrollView>

这种写法会造成ExpandableListView的高度始终只能显示一个item,后来发现在scrollView里必须加一个LinearLayout,问题解决,不知道为啥

<ScrollView

android:id="@+id/myinfo_order_scrollview"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/bg_white">



<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical">



<ExpandableListView

android:id="@+id/myinfo_help_listview"

android:layout_width="match_parent"

android:layout_height="wrap_content" >

</ExpandableListView>

</LinearLayout>

</ScrollView>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: