首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NestedScrollView不滚动

NestedScrollView不滚动
EN

Stack Overflow用户
提问于 2018-02-19 19:37:04
回答 1查看 2.3K关注 0票数 0

我在嵌套滚动视图中有两个列表视图,并且我希望两个列表视图作为一个滚动。这是我实现的,但我没有看到任何卷轴,有人能告诉我出了什么问题吗?

代码语言:javascript
复制
<?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>
EN

回答 1

Stack Overflow用户

发布于 2018-02-19 19:41:07

从nestedScrollView android:fillViewport="true"中删除这一行

编辑

如果您想看到每个listView的全部高度,请遵循以下链接.用这种方法..。设置基于子 listview and recyclerview doesnot wrap content with count的列表视图高度

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48873048

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档