I have an app that reuses images in a recyclerview. I'd like to know the best way to save resources using the same images repeatedly. My knowledge of memory use is none at best.
I have an image that gets scaled depending on its use in the app, but when in the list what is the best way to display the same image. Is the image memory getting reused for either of these or is each image taking of a chunk of memory separately. Is there a better way?
pholder.nodeImage.setImageBitmap(Tools.decodeSampledBitmapFromResource(context.getResources(),R.drawable.folder,50,50));
or
pholder.nodeImage.setImageResource(R.drawable.folder);