我加入了RecyclerView我的内心NestedScrollView.基本上我希望RecyclerView与其他视图一起滚动.我面临的问题是,对于一小组数据,它工作正常,但是每当我启动活动时,对于大量数据(200个条目),它会冻结大约3-5秒然后加载.我删除了NestedScrollView它,它完美地工作,但它没有提供我想要的行为.
(有关额外信息,我正在从SQLite数据库加载数据.滚动没有问题,因为它很平滑.唯一的问题是活动冻结了一段时间)
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<... Some other Views ...>
<android.support.v7.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Run Code Online (Sandbox Code Playgroud)