item.xml
<ImageView
android:id="@+id/movie_image"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/movie_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
同时是使用new GridLayoutManager(getActivity(),2)
以及glide
加载图片,这个时候如果想要更流畅的加载图片还需要采取什么方法。
监听滚动事件,滚动时不加载,或者,滚动速度超过一定值不加载。