我的recyclerview滾動是laggy。它在我開始通過觸摸Recyclerview進行滾動時滯後,但是從上面的視圖開始時,它不會滯後。 我也禁用了recyclerview上的nestedscrolling。Laggy RecyclerView
這裏是我的佈局:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true">
<TextView
android:layout_width="match_parent"
android:layout_height="200dp"
android:text="HAHHAHA"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/mRecyclerViewMain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:background="@android:color/transparent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</FrameLayout>
這裏是一個video的滯後。這就像滾動跳過一些佈局。
''setNestedScrollView = false' recyclerview –
@PriteshVadhiya我在我的OnCreate()方法中將nestedscrolling設置爲false。 'mRecyclerViewMain.setNestedScrollingEnabled(false);' – Charlie
您嘗試過[此解決方案](https://stackoverflow.com/a/40147626/8164071) –