首页 > 解决方案 > recyclerview 中的nestedscrollview 花费大量时间来显示数据

问题描述

  <android.support.v4.widget.NestedScrollView
    android:id="@+id/nestedScrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:overScrollMode="never">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </LinearLayout>
 </android.support.v4.widget.NestedScrollView>

我在另一个 recyclerview 中使用 recycleview 创建了一个自定义日历。它工作正常滚动不平滑所以我在stackoverflow中搜索更改为上面的代码现在滚动平滑但是如果打开该活动它需要很长时间来显示我测试过的数据我将需要15秒来显示数据

标签: androidandroid-recyclerview

解决方案


推荐阅读