Updating Image with in Recycleview
I am working on chatapp, when user clicks on imageview in Recycleview, I am downloading image to local storage and then trying to reload with picasso, Then Recycleview is jumping to another position.
Note : Based on my R&D, I understood Imageview required focus while reloading it. I am not sure, Please let me understand what is the best way to reload image in Recycleview in specif position without jumping like how whatsapp is loading images in chatscreen onclick of download.
I am using below method to update specif position.
notifyItemChanged(position);
And If I try to Reload with below methods then no problem, But OOM(Out of memory) may come while loading from URI
messageImageView.setImageURI(Uri.fromFile(fileImage));
messageImageView.setImageResource(R.drawable.icn_conv_clicktodownload);
Problem Case :
Picasso.get().load(fileImage).resize(viewWidth, viewHeight).
centerCrop().into(messageImageView);