在開發(fā)過程中加載更多是非常常見的,有兩個細(xì)節(jié)需要注意
1圖片的大小問題 圖片寬不要設(shè)置wrap_content
設(shè)置android:adjustViewBounds="true" 正好到屏幕邊緣
<ImageView
android:adjustViewBounds="true"
android:id="@+id/iv_item"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
2 就是在適配器里添加占位符了
apply(new RequestOptions().placeholder(R.mipmap.ic_launcher))
Glide.with(context).load(list.get(position).getUrl())
.apply(new RequestOptions().placeholder(R.mipmap.ic_launcher))
.into(holder.iv);