I am loading 400x200 images in RecyclerView, but scrolling is laggy on 2k devices. I am using Picasso for loading images from resource.
As you can see in the demo ima
In my case, bitmap creation was making delay for scroll. So I put bitmap creation in background thread and set to image in UI thread. This way, UI is not blocked for bitmap creation
new Thread(new Runnable() {
@Override
public void run() {
Bitmap myBitmap = BitmapFactory.decodeFile(filepath);
activity.runOnUiThread(new Runnable() {
public void run() {
vItem.imgProfile.setImageBitmap(myBitmap);
}
});
}
}).start();