我在嵌套滚动视图中有两个列表视图,并且我希望两个列表视图作为一个滚动。这是我实现的,但我没有看到任何卷轴,有人能告诉我出了什么问题吗?
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gcm_list_item_header_bg"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView
android:id="@+id/lv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
>
</ListView>
<ListView
android:id="@+id/lv_disabled_activities"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
>
</ListView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>发布于 2018-02-19 19:41:07
从nestedScrollView android:fillViewport="true"中删除这一行
编辑
如果您想看到每个listView的全部高度,请遵循以下链接.用这种方法..。设置基于子 listview and recyclerview doesnot wrap content with count的列表视图高度
https://stackoverflow.com/questions/48873048
复制相似问题