0


I have an adapter where I pull images(around 12) with URLs but some of them don't load. And, its not the image size particularly. None of the images are above 200KB.

Please take a look at the image below for rough idea:


Here, Red implies the viewholder where the images are not loaded. Whenever I open the app, the Red is random. It happens mostly on two or three viewholders.


Code

 Glide.with(viewHolder.itemView.getContext())
             .load(userClass.getUser_image())
             .apply(
                     new RequestOptions()
                             .centerCrop()
                             .placeholder(R.drawable.blueimage)
                             .error(R.drawable.redimage)
                             .diskCacheStrategy(DiskCacheStrategy.ALL)
                             .dontTransform())
             .into(viewHolder.imageViewUsersItemUsersImage);

Please note that this only happens on first load. Once the images are cached, they load faster. But my app shows new images most of the times, so I want the images to load at once and faster.

Please help
Thanks in Advance.

Sushan Niroula
  • 119
  • 1
  • 1
  • 8

0 Answers0