我正在使用嵌套式滚动视图(Nested Scrollview)来包装RecyclerView和其他按钮。它工作得非常完美,但我注意到当我滚动时不太流畅。请指导如何使滚动更加顺畅。
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollView"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_action_filter"
android:text="Filter"
android:id="@+id/btn_filter"
android:layout_margin="0dp"
android:layout_weight="1"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_action_sortbyt"
android:layout_margin="0dp"
android:text="Sort By"
android:id="@+id/btn_sortby"
android:layout_weight="1"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/lastest_product_list"
android:nestedScrollingEnabled="false"
android:isScrollContainer="false">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>