0

I am loading all device images in recyclerview using Picasso lib but problem which i am facing in this is recyleview loading all image in one hit I want image will load when user scroll down not in one hit Note:- I am using multiple recyleview because i am showing device image datewise

  @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        ImageList imageList = imageLists.get(position);
        ImageView imageView = holder.imageView;
        File imgFile = new File(imageList.path);
        if(imgFile.exists()) {
            Picasso.with(context).load(imgFile).resize(230, 100)
                    .centerCrop().placeholder(R.mipmap.ic_launcher).into(imageView);
        }

    }
Nishant Dixit
  • 5,388
  • 5
  • 17
  • 29
  • 1
    Put a breakpoint in this method and scroll down the list. You should see that the images are loaded as you scroll. It might be that they are loaded so quickly that you don't notice. – MSpeed Aug 09 '17 at 10:32
  • Refer following links once:https://www.learn2crack.com/2016/02/image-loading-recyclerview-picasso.html https://stackoverflow.com/questions/34866965/recyclerview-lazy-loading-universal-image-loader – komal akhani Aug 09 '17 at 10:59

0 Answers0