use glide load picture problem
Closed this issue · 1 comments
t2314862168 commented
@yayaa
I use Glide to test the library,then i find a problem . If the finger don't move in the screen , the screenshots is this
the pictures do not display nomally. But if the finger move in the screen ,the screenshots is this
the pictures can display nomally
my code is below
@Override
public void onBindViewHolder(ViewHolder viewHolder, int position) {
MyGlideUtils.loadImgByResId(context, imageIds[position % imageIds.length], viewHolder.getBackgroundImage());
// viewHolder.getBackgroundImage().setImageResource(imageIds[position % imageIds.length]);
viewHolder.getTextView().setText("Row " + position);
// # CAUTION:
// Important to call this method
viewHolder.getBackgroundImage().reuse();
}
MyGlideUtils is below
public static void loadImgByResId(Context context, int resId, ImageView imageView) {
Glide.with(context)
.load(resId)
// .centerCrop()
.placeholder(R.mipmap.ic_launcher)
.into(imageView);
}
if use centerCrop the Parallax does't work ,the reason i don't find .
If you have free time , please help me ,thank you !